pub struct BusProxy { /* private fields */ }
Implementations§
Source§impl BusProxy
impl BusProxy
Sourcepub fn take_event_stream(&self) -> BusEventStream
pub fn take_event_stream(&self) -> BusEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn get_host_bridge_info(
&self,
) -> QueryResponseFut<HostBridgeInfo, DefaultFuchsiaResourceDialect>
pub fn get_host_bridge_info( &self, ) -> QueryResponseFut<HostBridgeInfo, DefaultFuchsiaResourceDialect>
Retrieve information about the segment group and buses covered by a Bus.
Sourcepub fn get_devices(
&self,
) -> QueryResponseFut<Vec<PciDevice>, DefaultFuchsiaResourceDialect>
pub fn get_devices( &self, ) -> QueryResponseFut<Vec<PciDevice>, DefaultFuchsiaResourceDialect>
Retrieve all Devices on the Bus.
Sourcepub fn read_bar(
&self,
device: &Address,
bar_id: u8,
offset: u64,
size: u64,
) -> QueryResponseFut<BusReadBarResult, DefaultFuchsiaResourceDialect>
pub fn read_bar( &self, device: &Address, bar_id: u8, offset: u64, size: u64, ) -> QueryResponseFut<BusReadBarResult, DefaultFuchsiaResourceDialect>
Read from a Device’s base address register (BAR). The BAR must be an MMIO type.
Parameters |device|: The address of the device to read from. |bar_id|: The ID of the BAR to read. |offset|: The offset, in bytes, to start the read (default: 0 bytes). |size|: The size of the read (default: 128 bytes). The max size for a read is |READBAR_MAX_SIZE|.
Errors: |ZX_ERR_NOT_FOUND|: |device| was not found, or |bar_id| did not exist in |device|. |ZX_ERR_INVALID_ARGS|: |bar_id| is invalid, or offset / size combined are invalid for the given BAR’s size. |ZX_ERR_NOT_SUPPORTED|: The BAR specified by |bar_id| is not an MMIO BAR.
Trait Implementations§
Source§impl BusProxyInterface for BusProxy
impl BusProxyInterface for BusProxy
type GetHostBridgeInfoResponseFut = QueryResponseFut<HostBridgeInfo>
type GetDevicesResponseFut = QueryResponseFut<Vec<PciDevice>>
type ReadBarResponseFut = QueryResponseFut<Result<Vec<u8>, i32>>
fn get_host_bridge_info(&self) -> Self::GetHostBridgeInfoResponseFut
fn get_devices(&self) -> Self::GetDevicesResponseFut
fn read_bar( &self, device: &Address, bar_id: u8, offset: u64, size: u64, ) -> Self::ReadBarResponseFut
Source§impl Proxy for BusProxy
impl Proxy for BusProxy
Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Auto Trait Implementations§
impl Freeze for BusProxy
impl !RefUnwindSafe for BusProxy
impl Send for BusProxy
impl Sync for BusProxy
impl Unpin for BusProxy
impl !UnwindSafe for BusProxy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)