Struct crosvm_direct::crosvm::argument::KeyValuePair
source · [−]Fields
context: &'a str
key: &'a str
value: Option<&'a str>
Implementations
sourceimpl<'a> KeyValuePair<'a>
impl<'a> KeyValuePair<'a>
fn handle_parse_err<T, E: Error>(
&self,
result: Result<T, E>
) -> Result<T, Error>
pub fn key(&self) -> &'a str
pub fn value(&self) -> Result<&'a str, Error>
fn get_numeric<T>(&self, val: &str) -> Result<T, Error> where
T: TryFrom<u64>,
<T as TryFrom<u64>>::Error: Error,
pub fn parse_numeric<T>(&self) -> Result<T, Error> where
T: TryFrom<u64>,
<T as TryFrom<u64>>::Error: Error,
pub fn key_numeric<T>(&self) -> Result<T, Error> where
T: TryFrom<u64>,
<T as TryFrom<u64>>::Error: Error,
pub fn parse_or<T>(&self, default: T) -> Result<T, Error> where
T: FromStr,
<T as FromStr>::Err: Error,
pub fn invalid_key_err(&self) -> Error
pub fn invalid_value_err(&self, description: String) -> Error
Auto Trait Implementations
impl<'a> RefUnwindSafe for KeyValuePair<'a>
impl<'a> Send for KeyValuePair<'a>
impl<'a> Sync for KeyValuePair<'a>
impl<'a> Unpin for KeyValuePair<'a>
impl<'a> UnwindSafe for KeyValuePair<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more