pub enum ArgumentValue<'a> {
String(&'a str),
Integer(i32),
Boolean(bool),
Null,
}
Expand description
A type for possible values an argument key could have.
Those consuming values should attempt to be flexible when
accepting values. For instance a truthy key should accept
1
, true
, and Null
(as it indicates that they key is
present at all) as meaning “true”.
Variants§
String(&'a str)
A string argument value.
Integer(i32)
An integer argument value.
Boolean(bool)
A boolean argument value.
Null
No value explicitly passed for this argument. It notes that the key was included in the mapping.
Trait Implementations§
Source§impl<'a> Clone for ArgumentValue<'a>
impl<'a> Clone for ArgumentValue<'a>
Source§fn clone(&self) -> ArgumentValue<'a>
fn clone(&self) -> ArgumentValue<'a>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for ArgumentValue<'a>
impl<'a> Debug for ArgumentValue<'a>
Source§impl<'a> From<&'a str> for ArgumentValue<'a>
impl<'a> From<&'a str> for ArgumentValue<'a>
Source§impl From<()> for ArgumentValue<'_>
impl From<()> for ArgumentValue<'_>
Source§impl From<bool> for ArgumentValue<'_>
impl From<bool> for ArgumentValue<'_>
Source§impl From<i32> for ArgumentValue<'_>
impl From<i32> for ArgumentValue<'_>
Source§impl<'a> PartialEq for ArgumentValue<'a>
impl<'a> PartialEq for ArgumentValue<'a>
impl<'a> Copy for ArgumentValue<'a>
impl<'a> Eq for ArgumentValue<'a>
impl<'a> StructuralPartialEq for ArgumentValue<'a>
Auto Trait Implementations§
impl<'a> Freeze for ArgumentValue<'a>
impl<'a> RefUnwindSafe for ArgumentValue<'a>
impl<'a> Send for ArgumentValue<'a>
impl<'a> Sync for ArgumentValue<'a>
impl<'a> Unpin for ArgumentValue<'a>
impl<'a> UnwindSafe for ArgumentValue<'a>
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