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.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Auto Trait Implementations§
impl Freeze for ArgumentsProxy
impl !RefUnwindSafe for ArgumentsProxy
impl Send for ArgumentsProxy
impl Sync for ArgumentsProxy
impl Unpin for ArgumentsProxy
impl !UnwindSafe for ArgumentsProxy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)