pub enum SpecConfigValue {
Bool(bool),
Int(i64),
Float(f64),
String(String),
}Expand description
A config property’s value, as declared.
Typed rather than a String because the previous version stored the KDL source form
— KdlValue::to_string() — so a default="4" was read back as the four characters
"4" with its quotes, and writing it out again added another pair. Each round trip
added a layer. Keeping the value means the writer can render it once, correctly.
Variants§
Implementations§
Trait Implementations§
Source§impl Clone for SpecConfigValue
impl Clone for SpecConfigValue
Source§fn clone(&self) -> SpecConfigValue
fn clone(&self) -> SpecConfigValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SpecConfigValue
impl Debug for SpecConfigValue
Source§impl From<&str> for SpecConfigValue
impl From<&str> for SpecConfigValue
Source§impl From<String> for SpecConfigValue
impl From<String> for SpecConfigValue
Source§impl From<bool> for SpecConfigValue
impl From<bool> for SpecConfigValue
Source§impl From<f64> for SpecConfigValue
impl From<f64> for SpecConfigValue
Source§impl From<i64> for SpecConfigValue
impl From<i64> for SpecConfigValue
Source§impl PartialEq for SpecConfigValue
impl PartialEq for SpecConfigValue
Source§impl Serialize for SpecConfigValue
impl Serialize for SpecConfigValue
impl StructuralPartialEq for SpecConfigValue
Auto Trait Implementations§
impl Freeze for SpecConfigValue
impl RefUnwindSafe for SpecConfigValue
impl Send for SpecConfigValue
impl Sync for SpecConfigValue
impl Unpin for SpecConfigValue
impl UnsafeUnpin for SpecConfigValue
impl UnwindSafe for SpecConfigValue
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§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