Enum sqruff_lib::core::config::Value
source · pub enum Value {
Int(i32),
Bool(bool),
Float(f64),
String(Box<str>),
Map(AHashMap<String, Value>),
Array(Vec<Value>),
None,
}
Variants§
Int(i32)
Bool(bool)
Float(f64)
String(Box<str>)
Map(AHashMap<String, Value>)
Array(Vec<Value>)
None
Implementations§
source§impl Value
impl Value
pub fn to_bool(&self) -> bool
pub fn as_map(&self) -> Option<&AHashMap<String, Value>>
pub fn as_map_mut(&mut self) -> Option<&mut AHashMap<String, Value>>
pub fn as_int(&self) -> Option<i32>
pub fn as_string(&self) -> Option<&str>
pub fn as_bool(&self) -> Option<bool>
Trait Implementations§
source§impl PartialEq for Value
impl PartialEq 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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more