pub trait ItemsLocalServerHandler<___T: Transport = Channel> {
// Required methods
fn get(
&mut self,
request: Request<Get, ___T>,
responder: Responder<Get, ___T>,
) -> impl Future<Output = ()>;
fn get2(
&mut self,
request: Request<Get2, ___T>,
responder: Responder<Get2, ___T>,
) -> impl Future<Output = ()>;
fn get_bootloader_file(
&mut self,
request: Request<GetBootloaderFile, ___T>,
responder: Responder<GetBootloaderFile, ___T>,
) -> impl Future<Output = ()>;
}Expand description
A server handler for the Items protocol.
See Items for more details.
Required Methods§
Sourcefn get(
&mut self,
request: Request<Get, ___T>,
responder: Responder<Get, ___T>,
) -> impl Future<Output = ()>
fn get( &mut self, request: Request<Get, ___T>, responder: Responder<Get, ___T>, ) -> impl Future<Output = ()>
Get a payload for a boot item of type and extra.
NOTE: We return the length of the item, as VMOs must be page-aligned.
TODO: Refactor API: https://fxbug.dev/42109921
For a list of types, refer to <lib/zbi-format/zbi.h>.
For a list of extras, refer to <lib/zbi-format/driver-config.h>.
Sourcefn get2(
&mut self,
request: Request<Get2, ___T>,
responder: Responder<Get2, ___T>,
) -> impl Future<Output = ()>
fn get2( &mut self, request: Request<Get2, ___T>, responder: Responder<Get2, ___T>, ) -> impl Future<Output = ()>
Get all stored items of type, optionally also restricted by extra. Note that
length is returned for each item as VMOs are page-aligned.
Returns ZX_ERR_NOT_SUPPORTED if this is an untracked item which will never be stored.
Sourcefn get_bootloader_file(
&mut self,
request: Request<GetBootloaderFile, ___T>,
responder: Responder<GetBootloaderFile, ___T>,
) -> impl Future<Output = ()>
fn get_bootloader_file( &mut self, request: Request<GetBootloaderFile, ___T>, responder: Responder<GetBootloaderFile, ___T>, ) -> impl Future<Output = ()>
Gets the payload for a ZBI_TYPE_BOOTLOADER_FILE boot item.
Note: ZX_PROP_VMO_CONTENT_SIZE will be set to the actual file content size
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".