Enum wikidot_path::ArgumentValue
source · 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>
source§fn eq(&self, other: &ArgumentValue<'a>) -> bool
fn eq(&self, other: &ArgumentValue<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<'a> Copy for ArgumentValue<'a>
impl<'a> Eq for ArgumentValue<'a>
impl<'a> StructuralEq for ArgumentValue<'a>
impl<'a> StructuralPartialEq for ArgumentValue<'a>
Auto Trait Implementations§
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