pub enum Value {
Integer(i64),
Interrupt(InterruptType),
String(String),
}
Expand description
The allowable value types for definitions
Variants§
Implementations§
Source§impl Value
impl Value
Sourcepub fn as_integer_mut(&mut self) -> Option<&mut i64>
pub fn as_integer_mut(&mut self) -> Option<&mut i64>
Optionally returns mutable references to the inner fields if this is a Value::Integer
, otherwise None
Sourcepub fn as_integer(&self) -> Option<&i64>
pub fn as_integer(&self) -> Option<&i64>
Optionally returns references to the inner fields if this is a Value::Integer
, otherwise None
Sourcepub fn into_integer(self) -> Result<i64, Self>
pub fn into_integer(self) -> Result<i64, Self>
Returns the inner fields if this is a Value::Integer
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn as_interrupt_mut(&mut self) -> Option<&mut InterruptType>
pub fn as_interrupt_mut(&mut self) -> Option<&mut InterruptType>
Optionally returns mutable references to the inner fields if this is a Value::Interrupt
, otherwise None
Sourcepub fn as_interrupt(&self) -> Option<&InterruptType>
pub fn as_interrupt(&self) -> Option<&InterruptType>
Optionally returns references to the inner fields if this is a Value::Interrupt
, otherwise None
Sourcepub fn into_interrupt(self) -> Result<InterruptType, Self>
pub fn into_interrupt(self) -> Result<InterruptType, Self>
Returns the inner fields if this is a Value::Interrupt
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn as_string_mut(&mut self) -> Option<&mut String>
pub fn as_string_mut(&mut self) -> Option<&mut String>
Optionally returns mutable references to the inner fields if this is a Value::String
, otherwise None
Sourcepub fn as_string(&self) -> Option<&String>
pub fn as_string(&self) -> Option<&String>
Optionally returns references to the inner fields if this is a Value::String
, otherwise None
Sourcepub fn into_string(self) -> Result<String, Self>
pub fn into_string(self) -> Result<String, Self>
Returns the inner fields if this is a Value::String
, otherwise returns back the enum in the Err
case of the result