pub struct ArgumentsSynchronousProxy { /* private fields */ }
Implementations§
Source§impl ArgumentsSynchronousProxy
impl ArgumentsSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<ArgumentsEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<ArgumentsEvent, 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_string(
&self,
key: &str,
___deadline: MonotonicInstant,
) -> Result<Option<String>, Error>
pub fn get_string( &self, key: &str, ___deadline: MonotonicInstant, ) -> Result<Option<String>, Error>
Get the value of a boot argument key
.
Sourcepub fn get_strings(
&self,
keys: &[String],
___deadline: MonotonicInstant,
) -> Result<Vec<Option<String>>, Error>
pub fn get_strings( &self, keys: &[String], ___deadline: MonotonicInstant, ) -> Result<Vec<Option<String>>, Error>
Get the values of a list of arguments specified in keys
.
Sourcepub fn get_bool(
&self,
key: &str,
defaultval: bool,
___deadline: MonotonicInstant,
) -> Result<bool, Error>
pub fn get_bool( &self, key: &str, defaultval: bool, ___deadline: MonotonicInstant, ) -> Result<bool, Error>
Get the boolean value of a boot argument keys
,
or return defaultval
if the argument is not present.
A key is considered to be false if its string value is exactly
“off”, “0”, or “false”. Any other value (including empty) is returned
as true.
Sourcepub fn get_bools(
&self,
keys: &[BoolPair],
___deadline: MonotonicInstant,
) -> Result<Vec<bool>, Error>
pub fn get_bools( &self, keys: &[BoolPair], ___deadline: MonotonicInstant, ) -> Result<Vec<bool>, Error>
Get the boolean values of a list of boot arguments keys.key
,
or return keys.defaultval
for each if not present.
Sourcepub fn collect(
&self,
prefix: &str,
___deadline: MonotonicInstant,
) -> Result<Vec<String>, Error>
pub fn collect( &self, prefix: &str, ___deadline: MonotonicInstant, ) -> Result<Vec<String>, Error>
Get all boot arguments with keys starting with
prefix
. Returns a vector with strings of the form ‘key=value’.
TODO(https://fxbug.dev/42108659) - remove Collect once boot arguments have been componentised.
Trait Implementations§
Source§impl Debug for ArgumentsSynchronousProxy
impl Debug for ArgumentsSynchronousProxy
Source§impl SynchronousProxy for ArgumentsSynchronousProxy
impl SynchronousProxy for ArgumentsSynchronousProxy
Source§type Proxy = ArgumentsProxy
type Proxy = ArgumentsProxy
Source§type Protocol = ArgumentsMarker
type Protocol = ArgumentsMarker
Proxy
controls.