pub enum Value {
Singular(String),
Mapping(String, String),
OptionalKey(Option<String>, String),
UnquotedOptionalKey(Option<String>, String),
OptionalValue(String, Option<String>),
UnquotedOptionalValue(String, Option<String>),
UnquotedMapping(String, String),
}Expand description
The value of an Instruction.
Variants§
Singular(String)
A singular value.
Mapping(String, String)
A mapping (2 values).
OptionalKey(Option<String>, String)
A mapping with an optional key.
UnquotedOptionalKey(Option<String>, String)
A mapping with an optional key. Once printed, the value won’t have quotes.
OptionalValue(String, Option<String>)
A mapping with an optional value.
UnquotedOptionalValue(String, Option<String>)
A mapping with an optional value. Once printed, if the value exists, the value won’t have quotes.
UnquotedMapping(String, String)
A mapping with the value not having quotes.
Implementations§
Source§impl Value
impl Value
Sourcepub fn is_singular(&self) -> bool
pub fn is_singular(&self) -> bool
Returns true if the value is a Singular value.
Sourcepub fn is_mapping(&self) -> bool
pub fn is_mapping(&self) -> bool
Returns true if the value is a Mapping value.
Sourcepub fn is_optional_key(&self) -> bool
pub fn is_optional_key(&self) -> bool
Returns true if the value is an OptionalKey value.
Sourcepub fn is_unquoted_optional_key(&self) -> bool
pub fn is_unquoted_optional_key(&self) -> bool
Returns true if the value is an UnquotedOptionalKey value.
Sourcepub fn is_optional_value(&self) -> bool
pub fn is_optional_value(&self) -> bool
Returns true if the value is an OptionalValue value.
Sourcepub fn is_unquoted_optional_value(&self) -> bool
pub fn is_unquoted_optional_value(&self) -> bool
Returns true if the value is an UnquotedOptionalValue value.
Sourcepub fn is_unquoted_mapping(&self) -> bool
pub fn is_unquoted_mapping(&self) -> bool
Returns true if the value is an UnquotedMapping value.
Trait Implementations§
Source§impl Ord for Value
impl Ord for Value
Source§impl PartialOrd for Value
impl PartialOrd for Value
impl Eq for Value
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
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