pub enum ExampleValue {
Null,
Boolean(bool),
Integer(i64),
Unsigned(u64),
Number(f64),
String(String),
Array(Vec<ExampleValue>),
Object(BTreeMap<String, ExampleValue>),
}Variants§
Null
Boolean(bool)
Integer(i64)
Unsigned(u64)
Number(f64)
String(String)
Array(Vec<ExampleValue>)
Object(BTreeMap<String, ExampleValue>)
Implementations§
Source§impl ExampleValue
impl ExampleValue
pub fn array( values: impl IntoIterator<Item = impl Into<ExampleValue>>, ) -> ExampleValue
pub fn object( entries: impl IntoIterator<Item = (impl Into<String>, impl Into<ExampleValue>)>, ) -> ExampleValue
Trait Implementations§
Source§impl Clone for ExampleValue
impl Clone for ExampleValue
Source§fn clone(&self) -> ExampleValue
fn clone(&self) -> ExampleValue
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 ExampleValue
impl Debug for ExampleValue
Source§impl From<&str> for ExampleValue
impl From<&str> for ExampleValue
Source§fn from(value: &str) -> ExampleValue
fn from(value: &str) -> ExampleValue
Converts to this type from the input type.
Source§impl From<BTreeMap<String, ExampleValue>> for ExampleValue
impl From<BTreeMap<String, ExampleValue>> for ExampleValue
Source§fn from(value: BTreeMap<String, ExampleValue>) -> ExampleValue
fn from(value: BTreeMap<String, ExampleValue>) -> ExampleValue
Converts to this type from the input type.
Source§impl From<String> for ExampleValue
impl From<String> for ExampleValue
Source§fn from(value: String) -> ExampleValue
fn from(value: String) -> ExampleValue
Converts to this type from the input type.
Source§impl From<Vec<ExampleValue>> for ExampleValue
impl From<Vec<ExampleValue>> for ExampleValue
Source§fn from(value: Vec<ExampleValue>) -> ExampleValue
fn from(value: Vec<ExampleValue>) -> ExampleValue
Converts to this type from the input type.
Source§impl From<bool> for ExampleValue
impl From<bool> for ExampleValue
Source§fn from(value: bool) -> ExampleValue
fn from(value: bool) -> ExampleValue
Converts to this type from the input type.
Source§impl From<f32> for ExampleValue
impl From<f32> for ExampleValue
Source§fn from(value: f32) -> ExampleValue
fn from(value: f32) -> ExampleValue
Converts to this type from the input type.
Source§impl From<f64> for ExampleValue
impl From<f64> for ExampleValue
Source§fn from(value: f64) -> ExampleValue
fn from(value: f64) -> ExampleValue
Converts to this type from the input type.
Source§impl From<i8> for ExampleValue
impl From<i8> for ExampleValue
Source§fn from(value: i8) -> ExampleValue
fn from(value: i8) -> ExampleValue
Converts to this type from the input type.
Source§impl From<i16> for ExampleValue
impl From<i16> for ExampleValue
Source§fn from(value: i16) -> ExampleValue
fn from(value: i16) -> ExampleValue
Converts to this type from the input type.
Source§impl From<i32> for ExampleValue
impl From<i32> for ExampleValue
Source§fn from(value: i32) -> ExampleValue
fn from(value: i32) -> ExampleValue
Converts to this type from the input type.
Source§impl From<i64> for ExampleValue
impl From<i64> for ExampleValue
Source§fn from(value: i64) -> ExampleValue
fn from(value: i64) -> ExampleValue
Converts to this type from the input type.
Source§impl From<u8> for ExampleValue
impl From<u8> for ExampleValue
Source§fn from(value: u8) -> ExampleValue
fn from(value: u8) -> ExampleValue
Converts to this type from the input type.
Source§impl From<u16> for ExampleValue
impl From<u16> for ExampleValue
Source§fn from(value: u16) -> ExampleValue
fn from(value: u16) -> ExampleValue
Converts to this type from the input type.
Source§impl From<u32> for ExampleValue
impl From<u32> for ExampleValue
Source§fn from(value: u32) -> ExampleValue
fn from(value: u32) -> ExampleValue
Converts to this type from the input type.
Source§impl From<u64> for ExampleValue
impl From<u64> for ExampleValue
Source§fn from(value: u64) -> ExampleValue
fn from(value: u64) -> ExampleValue
Converts to this type from the input type.
Source§impl PartialEq for ExampleValue
impl PartialEq for ExampleValue
impl StructuralPartialEq for ExampleValue
Auto Trait Implementations§
impl Freeze for ExampleValue
impl RefUnwindSafe for ExampleValue
impl Send for ExampleValue
impl Sync for ExampleValue
impl Unpin for ExampleValue
impl UnsafeUnpin for ExampleValue
impl UnwindSafe for ExampleValue
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