pub struct ItemsSynchronousProxy { /* private fields */ }
Implementations§
Source§impl ItemsSynchronousProxy
impl ItemsSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<ItemsEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<ItemsEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn get(
&self,
type_: u32,
extra: u32,
___deadline: MonotonicInstant,
) -> Result<(Option<Vmo>, u32), Error>
pub fn get( &self, type_: u32, extra: u32, ___deadline: MonotonicInstant, ) -> Result<(Option<Vmo>, u32), Error>
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 type
s, refer to <lib/zbi-format/zbi.h>.
For a list of extra
s, refer to <lib/zbi-format/driver-config.h>.
Sourcepub fn get2(
&self,
type_: u32,
extra: Option<&Extra>,
___deadline: MonotonicInstant,
) -> Result<ItemsGet2Result, Error>
pub fn get2( &self, type_: u32, extra: Option<&Extra>, ___deadline: MonotonicInstant, ) -> Result<ItemsGet2Result, Error>
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.
Sourcepub fn get_bootloader_file(
&self,
filename: &str,
___deadline: MonotonicInstant,
) -> Result<Option<Vmo>, Error>
pub fn get_bootloader_file( &self, filename: &str, ___deadline: MonotonicInstant, ) -> Result<Option<Vmo>, Error>
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
Trait Implementations§
Source§impl Debug for ItemsSynchronousProxy
impl Debug for ItemsSynchronousProxy
Source§impl SynchronousProxy for ItemsSynchronousProxy
impl SynchronousProxy for ItemsSynchronousProxy
Source§type Proxy = ItemsProxy
type Proxy = ItemsProxy
Source§type Protocol = ItemsMarker
type Protocol = ItemsMarker
Proxy
controls.