Skip to main content

BusServerHandler

Trait BusServerHandler 

Source
pub trait BusServerHandler<___T = Channel>
where ___T: Transport,
{ // Required methods fn get_host_bridge_info( &mut self, responder: Responder<GetHostBridgeInfo, ___T>, ) -> impl Future<Output = ()> + Send; fn get_devices( &mut self, responder: Responder<GetDevices, ___T>, ) -> impl Future<Output = ()> + Send; fn read_bar( &mut self, request: Request<ReadBar, ___T>, responder: Responder<ReadBar, ___T>, ) -> impl Future<Output = ()> + Send; }
Expand description

A server handler for the Bus protocol.

See Bus for more details.

Required Methods§

Source

fn get_host_bridge_info( &mut self, responder: Responder<GetHostBridgeInfo, ___T>, ) -> impl Future<Output = ()> + Send

Retrieve information about the segment group and buses covered by a Bus.

Source

fn get_devices( &mut self, responder: Responder<GetDevices, ___T>, ) -> impl Future<Output = ()> + Send

Retrieve all Devices on the Bus.

Source

fn read_bar( &mut self, request: Request<ReadBar, ___T>, responder: Responder<ReadBar, ___T>, ) -> impl Future<Output = ()> + Send

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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§