pub trait DeviceServerHandler<___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 = ()> + Send;
fn get_mmio_by_name(
&mut self,
request: Request<GetMmioByName, ___T>,
responder: Responder<GetMmioByName, ___T>,
) -> impl Future<Output = ()> + Send;
fn get_interrupt_by_id(
&mut self,
request: Request<GetInterruptById, ___T>,
responder: Responder<GetInterruptById, ___T>,
) -> impl Future<Output = ()> + Send;
fn get_interrupt_by_name(
&mut self,
request: Request<GetInterruptByName, ___T>,
responder: Responder<GetInterruptByName, ___T>,
) -> impl Future<Output = ()> + Send;
fn get_bti_by_id(
&mut self,
request: Request<GetBtiById, ___T>,
responder: Responder<GetBtiById, ___T>,
) -> impl Future<Output = ()> + Send;
fn get_bti_by_name(
&mut self,
request: Request<GetBtiByName, ___T>,
responder: Responder<GetBtiByName, ___T>,
) -> impl Future<Output = ()> + Send;
fn get_smc_by_id(
&mut self,
request: Request<GetSmcById, ___T>,
responder: Responder<GetSmcById, ___T>,
) -> impl Future<Output = ()> + Send;
fn get_smc_by_name(
&mut self,
request: Request<GetSmcByName, ___T>,
responder: Responder<GetSmcByName, ___T>,
) -> impl Future<Output = ()> + Send;
fn get_power_configuration(
&mut self,
responder: Responder<GetPowerConfiguration, ___T>,
) -> impl Future<Output = ()> + Send;
fn get_node_device_info(
&mut self,
responder: Responder<GetNodeDeviceInfo, ___T>,
) -> impl Future<Output = ()> + Send;
fn get_board_info(
&mut self,
responder: Responder<GetBoardInfo, ___T>,
) -> impl Future<Output = ()> + Send;
fn get_metadata(
&mut self,
request: Request<GetMetadata, ___T>,
responder: Responder<GetMetadata, ___T>,
) -> impl Future<Output = ()> + Send;
// Provided method
fn on_unknown_interaction(
&mut self,
ordinal: u64,
) -> impl Future<Output = ()> + Send { ... }
}Expand description
A server handler for the Device protocol.
See Device for more details.
Required Methods§
Sourcefn get_mmio_by_id(
&mut self,
request: Request<GetMmioById, ___T>,
responder: Responder<GetMmioById, ___T>,
) -> impl Future<Output = ()> + Send
fn get_mmio_by_id( &mut self, request: Request<GetMmioById, ___T>, responder: Responder<GetMmioById, ___T>, ) -> impl Future<Output = ()> + Send
Returns a memory mapped IO (MMIO) resource for the given |index|.
- error
ZX_ERR_OUT_OF_RANGEif |index| is equal or greater than the number of mmios. - error
ZX_ERR_INTERNALif the retrieved mmio is not valid. - error
ZX_ERR_NOT_FOUNDif the retrieved mmio’s base address is NULL.
Sourcefn get_mmio_by_name(
&mut self,
request: Request<GetMmioByName, ___T>,
responder: Responder<GetMmioByName, ___T>,
) -> impl Future<Output = ()> + Send
fn get_mmio_by_name( &mut self, request: Request<GetMmioByName, ___T>, responder: Responder<GetMmioByName, ___T>, ) -> impl Future<Output = ()> + Send
Returns a memory mapped IO (MMIO) resource for the given |name|.
- error
ZX_ERR_INVALID_ARGSif |name| is an empty string. - error
ZX_ERR_OUT_OF_RANGEif |name| is not found. - error
ZX_ERR_INTERNALif the retrieved mmio is not valid. - error
ZX_ERR_NOT_FOUNDif the retrieved’s mmio base address is NULL.
Sourcefn get_interrupt_by_id(
&mut self,
request: Request<GetInterruptById, ___T>,
responder: Responder<GetInterruptById, ___T>,
) -> impl Future<Output = ()> + Send
fn get_interrupt_by_id( &mut self, request: Request<GetInterruptById, ___T>, responder: Responder<GetInterruptById, ___T>, ) -> impl Future<Output = ()> + Send
Returns an interrupt handle for the given |index|.
|flags| is forwarded as the |options| parameter to zx_interrupt_create.
- error
ZX_ERR_OUT_OF_RANGEif |index| is equal or greater than the number of interrupts. - error
ZX_ERR_INTERNALif the retrieved interrupt is not valid.
Sourcefn get_interrupt_by_name(
&mut self,
request: Request<GetInterruptByName, ___T>,
responder: Responder<GetInterruptByName, ___T>,
) -> impl Future<Output = ()> + Send
fn get_interrupt_by_name( &mut self, request: Request<GetInterruptByName, ___T>, responder: Responder<GetInterruptByName, ___T>, ) -> impl Future<Output = ()> + Send
Returns an interrupt handle for the given |name|.
|flags| is forwarded as the |options| parameter to zx_interrupt_create.
- error
ZX_ERR_INVALID_ARGSif |name| is an empty string. - error
ZX_ERR_OUT_OF_RANGEif |name| is not found. - error
ZX_ERR_INTERNALif the retrieved interrupt is not valid.
Sourcefn get_bti_by_id(
&mut self,
request: Request<GetBtiById, ___T>,
responder: Responder<GetBtiById, ___T>,
) -> impl Future<Output = ()> + Send
fn get_bti_by_id( &mut self, request: Request<GetBtiById, ___T>, responder: Responder<GetBtiById, ___T>, ) -> impl Future<Output = ()> + Send
Returns a bus transaction initiator (bti) handle for the given |index|.
- error
ZX_ERR_OUT_OF_RANGEif |index| is equal or greater than the number of btis. - error
ZX_ERR_INTERNALif the retrieved bti is not valid.
Sourcefn get_bti_by_name(
&mut self,
request: Request<GetBtiByName, ___T>,
responder: Responder<GetBtiByName, ___T>,
) -> impl Future<Output = ()> + Send
fn get_bti_by_name( &mut self, request: Request<GetBtiByName, ___T>, responder: Responder<GetBtiByName, ___T>, ) -> impl Future<Output = ()> + Send
Returns a bus transaction initiator (bti) handle for the given |name|.
- error
ZX_ERR_INVALID_ARGSif |name| is an empty string. - error
ZX_ERR_OUT_OF_RANGEif |name| is not found. - error
ZX_ERR_INTERNALif the retrieved bti is not valid.
Sourcefn get_smc_by_id(
&mut self,
request: Request<GetSmcById, ___T>,
responder: Responder<GetSmcById, ___T>,
) -> impl Future<Output = ()> + Send
fn get_smc_by_id( &mut self, request: Request<GetSmcById, ___T>, responder: Responder<GetSmcById, ___T>, ) -> impl Future<Output = ()> + Send
Returns a secure monitor call (smc) handle for the given |index|.
- error
ZX_ERR_OUT_OF_RANGEif |index| is equal or greater than the number of smcs. - error
ZX_ERR_INTERNALif the retrieved smc is not valid.
Sourcefn get_smc_by_name(
&mut self,
request: Request<GetSmcByName, ___T>,
responder: Responder<GetSmcByName, ___T>,
) -> impl Future<Output = ()> + Send
fn get_smc_by_name( &mut self, request: Request<GetSmcByName, ___T>, responder: Responder<GetSmcByName, ___T>, ) -> impl Future<Output = ()> + Send
Returns a secure monitor call (smc) handle for the given |name|.
- error
ZX_ERR_INVALID_ARGSif |name| is an empty string. - error
ZX_ERR_OUT_OF_RANGEif |name| is not found. - error
ZX_ERR_INTERNALif the retrieved smc is not valid.
Sourcefn get_power_configuration(
&mut self,
responder: Responder<GetPowerConfiguration, ___T>,
) -> impl Future<Output = ()> + Send
fn get_power_configuration( &mut self, responder: Responder<GetPowerConfiguration, ___T>, ) -> impl Future<Output = ()> + Send
Returns power configuration for the device the driver has bound to.
Sourcefn get_node_device_info(
&mut self,
responder: Responder<GetNodeDeviceInfo, ___T>,
) -> impl Future<Output = ()> + Send
fn get_node_device_info( &mut self, responder: Responder<GetNodeDeviceInfo, ___T>, ) -> impl Future<Output = ()> + Send
Returns information about the device corresponding to the node that the driver has bound to.
Sourcefn get_board_info(
&mut self,
responder: Responder<GetBoardInfo, ___T>,
) -> impl Future<Output = ()> + Send
fn get_board_info( &mut self, responder: Responder<GetBoardInfo, ___T>, ) -> impl Future<Output = ()> + Send
Return information about the board the device is attached to.
Sourcefn get_metadata(
&mut self,
request: Request<GetMetadata, ___T>,
responder: Responder<GetMetadata, ___T>,
) -> impl Future<Output = ()> + Send
fn get_metadata( &mut self, request: Request<GetMetadata, ___T>, responder: Responder<GetMetadata, ___T>, ) -> impl Future<Output = ()> + Send
Returns the metadata associated with the device and |id|. Returns ZX_ERR_NOT_FOUND if the metadata does not exist.
Provided Methods§
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.