pub enum JssValue {
Null,
Boolean(bool),
Number(Number),
String(String),
Url(String),
Regex(String),
Array(Vec<JssValue>),
Object(IndexMap<String, JssValue>),
}Expand description
Represents any valid JSON value.
See the serde_json::value module documentation for usage examples.
Variants§
Null
Represents a null value.
Boolean(bool)
Represents a boolean.
Number(Number)
Represents a JSON number, whether integer or floating point.
String(String)
Represents a string.
Url(String)
Represents a url.
Regex(String)
Represents a regex.
Array(Vec<JssValue>)
Represents an array.
Object(IndexMap<String, JssValue>)
Represents an object.
By default the map is backed by a BTreeMap. Enable the preserve_order
feature of serde_json to use IndexMap instead, which preserves
entries in the order they are inserted into the map. In particular, this
allows JSON data to be deserialized into a Value and serialized to a
string while retaining the order of map keys in the input.
Implementations§
Trait Implementations§
impl Eq for JssValue
impl StructuralPartialEq for JssValue
Auto Trait Implementations§
impl Freeze for JssValue
impl RefUnwindSafe for JssValue
impl Send for JssValue
impl Sync for JssValue
impl Unpin for JssValue
impl UnsafeUnpin for JssValue
impl UnwindSafe for JssValue
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.