Skip to main content

DeviceLocalServerHandler

Trait DeviceLocalServerHandler 

Source
pub trait DeviceLocalServerHandler<___T: Transport = Channel> {
Show 13 methods // Required methods fn get_mmio_by_id( &mut self, request: Request<GetMmioById, ___T>, responder: Responder<GetMmioById, ___T>, ) -> impl Future<Output = ()>; fn get_mmio_by_name( &mut self, request: Request<GetMmioByName, ___T>, responder: Responder<GetMmioByName, ___T>, ) -> impl Future<Output = ()>; fn get_interrupt_by_id( &mut self, request: Request<GetInterruptById, ___T>, responder: Responder<GetInterruptById, ___T>, ) -> impl Future<Output = ()>; fn get_interrupt_by_name( &mut self, request: Request<GetInterruptByName, ___T>, responder: Responder<GetInterruptByName, ___T>, ) -> impl Future<Output = ()>; fn get_bti_by_id( &mut self, request: Request<GetBtiById, ___T>, responder: Responder<GetBtiById, ___T>, ) -> impl Future<Output = ()>; fn get_bti_by_name( &mut self, request: Request<GetBtiByName, ___T>, responder: Responder<GetBtiByName, ___T>, ) -> impl Future<Output = ()>; fn get_smc_by_id( &mut self, request: Request<GetSmcById, ___T>, responder: Responder<GetSmcById, ___T>, ) -> impl Future<Output = ()>; fn get_smc_by_name( &mut self, request: Request<GetSmcByName, ___T>, responder: Responder<GetSmcByName, ___T>, ) -> impl Future<Output = ()>; fn get_power_configuration( &mut self, responder: Responder<GetPowerConfiguration, ___T>, ) -> impl Future<Output = ()>; fn get_node_device_info( &mut self, responder: Responder<GetNodeDeviceInfo, ___T>, ) -> impl Future<Output = ()>; fn get_board_info( &mut self, responder: Responder<GetBoardInfo, ___T>, ) -> impl Future<Output = ()>; fn get_metadata( &mut self, request: Request<GetMetadata, ___T>, responder: Responder<GetMetadata, ___T>, ) -> impl Future<Output = ()>; // Provided method fn on_unknown_interaction( &mut self, ordinal: u64, ) -> impl Future<Output = ()> { ... }
}
Expand description

A server handler for the Device protocol.

See Device for more details.

Required Methods§

Source

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

Returns a memory mapped IO (MMIO) resource for the given |index|.

  • error ZX_ERR_OUT_OF_RANGE if |index| is equal or greater than the number of mmios.
  • error ZX_ERR_INTERNAL if the retrieved mmio is not valid.
  • error ZX_ERR_NOT_FOUND if the retrieved mmio’s base address is NULL.
Source

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

Returns a memory mapped IO (MMIO) resource for the given |name|.

  • error ZX_ERR_INVALID_ARGS if |name| is an empty string.
  • error ZX_ERR_OUT_OF_RANGE if |name| is not found.
  • error ZX_ERR_INTERNAL if the retrieved mmio is not valid.
  • error ZX_ERR_NOT_FOUND if the retrieved’s mmio base address is NULL.
Source

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

Returns an interrupt handle for the given |index|. |flags| is forwarded as the |options| parameter to zx_interrupt_create.

  • error ZX_ERR_OUT_OF_RANGE if |index| is equal or greater than the number of interrupts.
  • error ZX_ERR_INTERNAL if the retrieved interrupt is not valid.
Source

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

Returns an interrupt handle for the given |name|. |flags| is forwarded as the |options| parameter to zx_interrupt_create.

  • error ZX_ERR_INVALID_ARGS if |name| is an empty string.
  • error ZX_ERR_OUT_OF_RANGE if |name| is not found.
  • error ZX_ERR_INTERNAL if the retrieved interrupt is not valid.
Source

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

Returns a bus transaction initiator (bti) handle for the given |index|.

  • error ZX_ERR_OUT_OF_RANGE if |index| is equal or greater than the number of btis.
  • error ZX_ERR_INTERNAL if the retrieved bti is not valid.
Source

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

Returns a bus transaction initiator (bti) handle for the given |name|.

  • error ZX_ERR_INVALID_ARGS if |name| is an empty string.
  • error ZX_ERR_OUT_OF_RANGE if |name| is not found.
  • error ZX_ERR_INTERNAL if the retrieved bti is not valid.
Source

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

Returns a secure monitor call (smc) handle for the given |index|.

  • error ZX_ERR_OUT_OF_RANGE if |index| is equal or greater than the number of smcs.
  • error ZX_ERR_INTERNAL if the retrieved smc is not valid.
Source

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

Returns a secure monitor call (smc) handle for the given |name|.

  • error ZX_ERR_INVALID_ARGS if |name| is an empty string.
  • error ZX_ERR_OUT_OF_RANGE if |name| is not found.
  • error ZX_ERR_INTERNAL if the retrieved smc is not valid.
Source

fn get_power_configuration( &mut self, responder: Responder<GetPowerConfiguration, ___T>, ) -> impl Future<Output = ()>

Returns power configuration for the device the driver has bound to.

Source

fn get_node_device_info( &mut self, responder: Responder<GetNodeDeviceInfo, ___T>, ) -> impl Future<Output = ()>

Returns information about the device corresponding to the node that the driver has bound to.

Source

fn get_board_info( &mut self, responder: Responder<GetBoardInfo, ___T>, ) -> impl Future<Output = ()>

Return information about the board the device is attached to.

Source

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

Returns the metadata associated with the device and |id|. Returns ZX_ERR_NOT_FOUND if the metadata does not exist.

Provided Methods§

Source

fn on_unknown_interaction(&mut self, ordinal: u64) -> impl Future<Output = ()>

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.

Implementations on Foreign Types§

Source§

impl<___H, ___T> DeviceLocalServerHandler<___T> for Local<___H>
where ___H: DeviceServerHandler<___T>, ___T: Transport,

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

async fn get_power_configuration( &mut self, responder: Responder<GetPowerConfiguration, ___T>, )

Source§

async fn get_node_device_info( &mut self, responder: Responder<GetNodeDeviceInfo, ___T>, )

Source§

async fn get_board_info(&mut self, responder: Responder<GetBoardInfo, ___T>)

Source§

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

Source§

async fn on_unknown_interaction(&mut self, ordinal: u64)

Implementors§