pub enum ArgumentsRequest {
GetString {
key: String,
responder: ArgumentsGetStringResponder,
},
GetStrings {
keys: Vec<String>,
responder: ArgumentsGetStringsResponder,
},
GetBool {
key: String,
defaultval: bool,
responder: ArgumentsGetBoolResponder,
},
GetBools {
keys: Vec<BoolPair>,
responder: ArgumentsGetBoolsResponder,
},
Collect {
prefix: String,
responder: ArgumentsCollectResponder,
},
}
Expand description
Protocol for retrieving boot arguments.
Variants§
GetString
Get the value of a boot argument key
.
GetStrings
Get the values of a list of arguments specified in keys
.
GetBool
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.
GetBools
Get the boolean values of a list of boot arguments keys.key
,
or return keys.defaultval
for each if not present.
Collect
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.
Implementations§
Source§impl ArgumentsRequest
impl ArgumentsRequest
pub fn into_get_string(self) -> Option<(String, ArgumentsGetStringResponder)>
pub fn into_get_strings( self, ) -> Option<(Vec<String>, ArgumentsGetStringsResponder)>
pub fn into_get_bool(self) -> Option<(String, bool, ArgumentsGetBoolResponder)>
pub fn into_get_bools( self, ) -> Option<(Vec<BoolPair>, ArgumentsGetBoolsResponder)>
pub fn into_collect(self) -> Option<(String, ArgumentsCollectResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ArgumentsRequest
impl !RefUnwindSafe for ArgumentsRequest
impl Send for ArgumentsRequest
impl Sync for ArgumentsRequest
impl Unpin for ArgumentsRequest
impl !UnwindSafe for ArgumentsRequest
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
Mutably borrows from an owned value. Read more