pub enum TomlValue {
String(String),
Integer(i64),
Boolean(bool),
Array(Vec<TomlValue>),
Table(BTreeMap<String, TomlValue>),
}Expand description
A parsed TOML value.
Variants§
String(String)
A string value (e.g., "hello")
Integer(i64)
A 64-bit signed integer (e.g., 42)
Boolean(bool)
A boolean value (e.g., true)
Array(Vec<TomlValue>)
An array of values (e.g., ["a", "b"])
Table(BTreeMap<String, TomlValue>)
A table / map of key-value pairs
Implementations§
Source§impl TomlValue
impl TomlValue
Sourcepub fn as_integer(&self) -> Option<i64>
pub fn as_integer(&self) -> Option<i64>
Try to interpret this value as an integer.
Trait Implementations§
impl StructuralPartialEq for TomlValue
Auto Trait Implementations§
impl Freeze for TomlValue
impl RefUnwindSafe for TomlValue
impl Send for TomlValue
impl Sync for TomlValue
impl Unpin for TomlValue
impl UnwindSafe for TomlValue
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)