Enum uvls::core::config::ConfigValue
source · pub enum ConfigValue {
Bool(bool),
Number(f64),
String(String),
Cardinality(CardinalityEntry),
}
Expand description
This Enum stores the value configured by the user or loaded from a json config File.
Cardinality represents a feature with a set cardinality and results in a new layer when serializing.
Variants§
Implementations§
source§impl ConfigValue
impl ConfigValue
sourcepub fn ty(&self) -> Type
pub fn ty(&self) -> Type
Return the corresponding Type Definition of ConfigValue
§Returns:
- A value of the
Type
enum. The specific value being returned depends on the ConfigValue
sourcepub fn default(ty: Type) -> ConfigValue
pub fn default(ty: Type) -> ConfigValue
The function default
returns a ConfigValue
based on the input Type
.
pub fn is_default(&self) -> bool
Trait Implementations§
source§impl Clone for ConfigValue
impl Clone for ConfigValue
source§fn clone(&self) -> ConfigValue
fn clone(&self) -> ConfigValue
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 Debug for ConfigValue
impl Debug for ConfigValue
source§impl<'de> Deserialize<'de> for ConfigValue
impl<'de> Deserialize<'de> for ConfigValue
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for ConfigValue
impl Display for ConfigValue
source§impl Into<Expr> for ConfigValue
impl Into<Expr> for ConfigValue
source§impl PartialEq for ConfigValue
impl PartialEq for ConfigValue
source§impl Serialize for ConfigValue
impl Serialize for ConfigValue
impl StructuralPartialEq for ConfigValue
Auto Trait Implementations§
impl Freeze for ConfigValue
impl RefUnwindSafe for ConfigValue
impl Send for ConfigValue
impl Sync for ConfigValue
impl Unpin for ConfigValue
impl UnwindSafe for ConfigValue
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a [
CompactString
]. Read more