Skip to main content

BusLocalServerHandler

Trait BusLocalServerHandler 

Source
pub trait BusLocalServerHandler<___T: Transport = Channel> {
    // Required methods
    fn get_host_bridge_info(
        &mut self,
        responder: Responder<GetHostBridgeInfo, ___T>,
    ) -> impl Future<Output = ()>;
    fn get_devices(
        &mut self,
        responder: Responder<GetDevices, ___T>,
    ) -> impl Future<Output = ()>;
    fn read_bar(
        &mut self,
        request: Request<ReadBar, ___T>,
        responder: Responder<ReadBar, ___T>,
    ) -> impl Future<Output = ()>;
}
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 = ()>

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 = ()>

Retrieve all Devices on the Bus.

Source

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

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".

Implementations on Foreign Types§

Source§

impl<___H, ___T> BusLocalServerHandler<___T> for Local<___H>
where ___H: BusServerHandler<___T>, ___T: Transport,

Source§

async fn get_host_bridge_info( &mut self, responder: Responder<GetHostBridgeInfo, ___T>, )

Source§

async fn get_devices(&mut self, responder: Responder<GetDevices, ___T>)

Source§

async fn read_bar( &mut self, request: Request<ReadBar, ___T>, responder: Responder<ReadBar, ___T>, )

Implementors§