pub struct ArgumentsProxy { /* private fields */ }
Implementations§
Source§impl ArgumentsProxy
impl ArgumentsProxy
Sourcepub fn take_event_stream(&self) -> ArgumentsEventStream
pub fn take_event_stream(&self) -> ArgumentsEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn get_string(
&self,
key: &str,
) -> QueryResponseFut<Option<String>, DefaultFuchsiaResourceDialect>
pub fn get_string( &self, key: &str, ) -> QueryResponseFut<Option<String>, DefaultFuchsiaResourceDialect>
Get the value of a boot argument key
.
Sourcepub fn get_strings(
&self,
keys: &[String],
) -> QueryResponseFut<Vec<Option<String>>, DefaultFuchsiaResourceDialect>
pub fn get_strings( &self, keys: &[String], ) -> QueryResponseFut<Vec<Option<String>>, DefaultFuchsiaResourceDialect>
Get the values of a list of arguments specified in keys
.
Sourcepub fn get_bool(
&self,
key: &str,
defaultval: bool,
) -> QueryResponseFut<bool, DefaultFuchsiaResourceDialect>
pub fn get_bool( &self, key: &str, defaultval: bool, ) -> QueryResponseFut<bool, DefaultFuchsiaResourceDialect>
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],
) -> QueryResponseFut<Vec<bool>, DefaultFuchsiaResourceDialect>
pub fn get_bools( &self, keys: &[BoolPair], ) -> QueryResponseFut<Vec<bool>, DefaultFuchsiaResourceDialect>
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,
) -> QueryResponseFut<Vec<String>, DefaultFuchsiaResourceDialect>
pub fn collect( &self, prefix: &str, ) -> QueryResponseFut<Vec<String>, DefaultFuchsiaResourceDialect>
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 ArgumentsProxyInterface for ArgumentsProxy
impl ArgumentsProxyInterface for ArgumentsProxy
type GetStringResponseFut = QueryResponseFut<Option<String>>
type GetStringsResponseFut = QueryResponseFut<Vec<Option<String>>>
type GetBoolResponseFut = QueryResponseFut<bool>
type GetBoolsResponseFut = QueryResponseFut<Vec<bool>>
type CollectResponseFut = QueryResponseFut<Vec<String>>
fn get_string(&self, key: &str) -> Self::GetStringResponseFut
fn get_strings(&self, keys: &[String]) -> Self::GetStringsResponseFut
fn get_bool(&self, key: &str, defaultval: bool) -> Self::GetBoolResponseFut
fn get_bools(&self, keys: &[BoolPair]) -> Self::GetBoolsResponseFut
fn collect(&self, prefix: &str) -> Self::CollectResponseFut
Source§impl Clone for ArgumentsProxy
impl Clone for ArgumentsProxy
Source§fn clone(&self) -> ArgumentsProxy
fn clone(&self) -> ArgumentsProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ArgumentsProxy
impl Debug for ArgumentsProxy
Source§impl Proxy for ArgumentsProxy
impl Proxy for ArgumentsProxy
Source§type Protocol = ArgumentsMarker
type Protocol = ArgumentsMarker
Proxy
controls.