Enum simd_json::StaticNode[][src]

pub enum StaticNode {
    I64(i64),
    U64(u64),
    F64(f64),
    Bool(bool),
    Null,
}
Expand description

Static tape node

Variants

I64(i64)
Expand description

A signed 64 bit integer.

U64(u64)
Expand description

An unsigned 64 bit integer.

F64(f64)
Expand description

A floating point value

Bool(bool)
Expand description

A boolean value

Null
Expand description

The null value

Trait Implementations

impl Clone for StaticNode[src]

pub fn clone(&self) -> StaticNode[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for StaticNode[src]

pub fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>[src]

Formats the value using the given formatter. Read more

impl Default for StaticNode[src]

#[must_use]
pub fn default() -> StaticNode
[src]

Returns the “default value” for a type. Read more

impl<'v> Display for StaticNode[src]

pub fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>[src]

Formats the value using the given formatter. Read more

impl From<()> for StaticNode[src]

#[must_use]
pub fn from(_b: ()) -> StaticNode
[src]

Performs the conversion.

impl<'value> From<StaticNode> for Value<'value>[src]

#[must_use]
fn from(s: StaticNode) -> Self
[src]

Performs the conversion.

impl From<StaticNode> for Value[src]

#[must_use]
fn from(s: StaticNode) -> Self
[src]

Performs the conversion.

impl From<bool> for StaticNode[src]

#[must_use]
pub fn from(b: bool) -> StaticNode
[src]

Performs the conversion.

impl From<f32> for StaticNode[src]

#[must_use]
pub fn from(f: f32) -> StaticNode
[src]

Performs the conversion.

impl From<f64> for StaticNode[src]

#[must_use]
pub fn from(f: f64) -> StaticNode
[src]

Performs the conversion.

impl From<i16> for StaticNode[src]

#[must_use]
pub fn from(i: i16) -> StaticNode
[src]

Performs the conversion.

impl From<i32> for StaticNode[src]

#[must_use]
pub fn from(i: i32) -> StaticNode
[src]

Performs the conversion.

impl From<i64> for StaticNode[src]

#[must_use]
pub fn from(i: i64) -> StaticNode
[src]

Performs the conversion.

impl From<i8> for StaticNode[src]

#[must_use]
pub fn from(i: i8) -> StaticNode
[src]

Performs the conversion.

impl From<u16> for StaticNode[src]

#[must_use]
pub fn from(i: u16) -> StaticNode
[src]

Performs the conversion.

impl From<u32> for StaticNode[src]

#[must_use]
pub fn from(i: u32) -> StaticNode
[src]

Performs the conversion.

impl From<u64> for StaticNode[src]

#[must_use]
pub fn from(i: u64) -> StaticNode
[src]

Performs the conversion.

impl From<u8> for StaticNode[src]

#[must_use]
pub fn from(i: u8) -> StaticNode
[src]

Performs the conversion.

impl From<usize> for StaticNode[src]

#[must_use]
pub fn from(i: usize) -> StaticNode
[src]

Performs the conversion.

impl<'_> Index<&'_ str> for StaticNode[src]

type Output = ()

The returned type after indexing.

#[must_use]
pub fn index(&self, _index: &str) -> &<StaticNode as Index<&'_ str>>::Output
[src]

Performs the indexing (container[index]) operation. Read more

impl Index<usize> for StaticNode[src]

type Output = ()

The returned type after indexing.

#[must_use]
pub fn index(&self, _index: usize) -> &<StaticNode as Index<usize>>::Output
[src]

Performs the indexing (container[index]) operation. Read more

impl<'_> IndexMut<&'_ str> for StaticNode[src]

#[must_use]
pub fn index_mut(
    &mut self,
    _index: &str
) -> &mut <StaticNode as Index<&'_ str>>::Output
[src]

Performs the mutable indexing (container[index]) operation. Read more

impl IndexMut<usize> for StaticNode[src]

#[must_use]
pub fn index_mut(
    &mut self,
    _index: usize
) -> &mut <StaticNode as Index<usize>>::Output
[src]

Performs the mutable indexing (container[index]) operation. Read more

impl<'_> PartialEq<&'_ str> for StaticNode[src]

#[must_use]
pub fn eq(&self, other: &&str) -> bool
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialEq<()> for StaticNode[src]

#[must_use]
pub fn eq(&self, _other: &()) -> bool
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'a> PartialEq<StaticNode> for StaticNode[src]

#[must_use]
pub fn eq(&self, other: &StaticNode) -> bool
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialEq<String> for StaticNode[src]

#[must_use]
pub fn eq(&self, other: &String) -> bool
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialEq<bool> for StaticNode[src]

#[must_use]
pub fn eq(&self, other: &bool) -> bool
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialEq<f32> for StaticNode[src]

#[must_use]
pub fn eq(&self, other: &f32) -> bool
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialEq<f64> for StaticNode[src]

#[must_use]
pub fn eq(&self, other: &f64) -> bool
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialEq<i128> for StaticNode[src]

#[must_use]
pub fn eq(&self, other: &i128) -> bool
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialEq<i16> for StaticNode[src]

#[must_use]
pub fn eq(&self, other: &i16) -> bool
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialEq<i32> for StaticNode[src]

#[must_use]
pub fn eq(&self, other: &i32) -> bool
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialEq<i64> for StaticNode[src]

#[must_use]
pub fn eq(&self, other: &i64) -> bool
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialEq<i8> for StaticNode[src]

#[must_use]
pub fn eq(&self, other: &i8) -> bool
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialEq<str> for StaticNode[src]

#[must_use]
pub fn eq(&self, other: &str) -> bool
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialEq<u128> for StaticNode[src]

#[must_use]
pub fn eq(&self, other: &u128) -> bool
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialEq<u16> for StaticNode[src]

#[must_use]
pub fn eq(&self, other: &u16) -> bool
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialEq<u32> for StaticNode[src]

#[must_use]
pub fn eq(&self, other: &u32) -> bool
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialEq<u64> for StaticNode[src]

#[must_use]
pub fn eq(&self, other: &u64) -> bool
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialEq<u8> for StaticNode[src]

#[must_use]
pub fn eq(&self, other: &u8) -> bool
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialEq<usize> for StaticNode[src]

#[must_use]
pub fn eq(&self, other: &usize) -> bool
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl Value for StaticNode[src]

#[must_use]
pub fn value_type(&self) -> ValueType
[src]

Returns the type of the current Valye

#[must_use]
pub fn is_null(&self) -> bool
[src]

returns true if the current value is null

#[must_use]
fn is_float(&self) -> bool
[src]

returns true if the current value a floatingpoint number

#[must_use]
fn is_integer(&self) -> bool
[src]

returns true if the current value a integer number

#[must_use]
fn is_number(&self) -> bool
[src]

returns true if the current value a number either float or integer

#[must_use]
fn is_bool(&self) -> bool
[src]

returns true if the current value a bool

#[must_use]
fn is_i128(&self) -> bool
[src]

returns true if the current value can be represented as a i128

#[must_use]
fn is_i64(&self) -> bool
[src]

returns true if the current value can be represented as a i64

#[must_use]
fn is_i32(&self) -> bool
[src]

returns true if the current value can be represented as a i32

#[must_use]
fn is_i16(&self) -> bool
[src]

returns true if the current value can be represented as a i16

#[must_use]
fn is_i8(&self) -> bool
[src]

returns true if the current value can be represented as a i8

#[must_use]
fn is_u128(&self) -> bool
[src]

returns true if the current value can be represented as a u128

#[must_use]
fn is_u64(&self) -> bool
[src]

returns true if the current value can be represented as a u64

#[must_use]
fn is_usize(&self) -> bool
[src]

returns true if the current value can be represented as a usize

#[must_use]
fn is_u32(&self) -> bool
[src]

returns true if the current value can be represented as a u32

#[must_use]
fn is_u16(&self) -> bool
[src]

returns true if the current value can be represented as a u16

#[must_use]
fn is_u8(&self) -> bool
[src]

returns true if the current value can be represented as a u8

#[must_use]
fn is_f64(&self) -> bool
[src]

returns true if the current value can be represented as a f64

#[must_use]
fn is_f64_castable(&self) -> bool
[src]

returns true if the current value can be cast into a f64

#[must_use]
fn is_f32(&self) -> bool
[src]

returns true if the current value can be represented as a f64

#[must_use]
fn is_str(&self) -> bool
[src]

returns true if the current value can be represented as a str

#[must_use]
fn is_char(&self) -> bool
[src]

returns true if the current value can be represented as a char

#[must_use]
fn is_array(&self) -> bool
[src]

returns true if the current value can be represented as an array

#[must_use]
fn is_object(&self) -> bool
[src]

returns true if the current value can be represented as an object

impl ValueAccess for StaticNode[src]

type Target = StaticNode

The target for nested lookups

type Key = String

The type for Objects

type Array = Vec<StaticNode, Global>

The array structure

type Object = HashMap<String, StaticNode, RandomState>

The object structure

#[must_use]
pub fn as_array(&self) -> Option<&<StaticNode as ValueAccess>::Array>
[src]

Tries to represent the value as an array and returns a refference to it

#[must_use]
pub fn as_object(
    &self
) -> Option<&HashMap<<StaticNode as ValueAccess>::Key, StaticNode, RandomState>>
[src]

Tries to represent the value as an object and returns a refference to it

#[must_use]
pub fn as_bool(&self) -> Option<bool>
[src]

Tries to represent the value as a bool

#[must_use]
pub fn as_i64(&self) -> Option<i64>
[src]

Tries to represent the value as an i64

#[must_use]
pub fn as_u64(&self) -> Option<u64>
[src]

Tries to represent the value as an u64

#[must_use]
pub fn as_f64(&self) -> Option<f64>
[src]

Tries to represent the value as a f64

#[must_use]
pub fn cast_f64(&self) -> Option<f64>
[src]

Casts the current value to a f64 if possible, this will turn integer values into floats. Read more

#[must_use]
pub fn as_str(&self) -> Option<&str>
[src]

Tries to represent the value as a &str

#[must_use]
fn get<Q>(&self, k: &Q) -> Option<&Self::Target> where
    Q: Hash + Eq + Ord + ?Sized,
    Self::Key: Borrow<Q>,
    Self::Key: Hash,
    Self::Key: Eq
[src]

Gets a ref to a value based on a key, returns None if the current Value isn’t an Object or doesn’t contain the key it was asked for. Read more

#[must_use]
fn contains_key<Q>(&self, k: &Q) -> bool where
    Q: Hash + Eq + Ord + ?Sized,
    Self::Key: Borrow<Q>,
    Self::Key: Hash,
    Self::Key: Eq
[src]

Checks if a Value contains a given key. This will return flase if Value isn’t an object Read more

#[must_use]
fn get_idx(&self, i: usize) -> Option<&Self::Target>
[src]

Gets a ref to a value based on n index, returns None if the current Value isn’t an Array or doesn’t contain the index it was asked for. Read more

#[must_use]
fn get_bool<Q>(&self, k: &Q) -> Option<bool> where
    Q: Hash + Eq + Ord + ?Sized,
    Self::Key: Borrow<Q>,
    Self::Key: Hash,
    Self::Key: Eq
[src]

Tries to get an element of an object as a bool

#[must_use]
fn as_i128(&self) -> Option<i128>
[src]

Tries to represent the value as an i128

#[must_use]
fn get_i128<Q>(&self, k: &Q) -> Option<i128> where
    Q: Hash + Eq + Ord + ?Sized,
    Self::Key: Borrow<Q>,
    Self::Key: Hash,
    Self::Key: Eq
[src]

Tries to get an element of an object as a i128

#[must_use]
fn get_i64<Q>(&self, k: &Q) -> Option<i64> where
    Q: Hash + Eq + Ord + ?Sized,
    Self::Key: Borrow<Q>,
    Self::Key: Hash,
    Self::Key: Eq
[src]

Tries to get an element of an object as a i64

#[must_use]
fn as_i32(&self) -> Option<i32>
[src]

Tries to represent the value as an i32

#[must_use]
fn get_i32<Q>(&self, k: &Q) -> Option<i32> where
    Q: Hash + Eq + Ord + ?Sized,
    Self::Key: Borrow<Q>,
    Self::Key: Hash,
    Self::Key: Eq
[src]

Tries to get an element of an object as a i32

#[must_use]
fn as_i16(&self) -> Option<i16>
[src]

Tries to represent the value as an i16

#[must_use]
fn get_i16<Q>(&self, k: &Q) -> Option<i16> where
    Q: Hash + Eq + Ord + ?Sized,
    Self::Key: Borrow<Q>,
    Self::Key: Hash,
    Self::Key: Eq
[src]

Tries to get an element of an object as a i16

#[must_use]
fn as_i8(&self) -> Option<i8>
[src]

Tries to represent the value as an i8

#[must_use]
fn get_i8<Q>(&self, k: &Q) -> Option<i8> where
    Q: Hash + Eq + Ord + ?Sized,
    Self::Key: Borrow<Q>,
    Self::Key: Hash,
    Self::Key: Eq
[src]

Tries to get an element of an object as a i8

#[must_use]
fn as_u128(&self) -> Option<u128>
[src]

Tries to represent the value as an u128

#[must_use]
fn get_u128<Q>(&self, k: &Q) -> Option<u128> where
    Q: Hash + Eq + Ord + ?Sized,
    Self::Key: Borrow<Q>,
    Self::Key: Hash,
    Self::Key: Eq
[src]

Tries to get an element of an object as a u128

#[must_use]
fn get_u64<Q>(&self, k: &Q) -> Option<u64> where
    Q: Hash + Eq + Ord + ?Sized,
    Self::Key: Borrow<Q>,
    Self::Key: Hash,
    Self::Key: Eq
[src]

Tries to get an element of an object as a u64

#[must_use]
fn as_usize(&self) -> Option<usize>
[src]

Tries to represent the value as an usize

#[must_use]
fn get_usize<Q>(&self, k: &Q) -> Option<usize> where
    Q: Hash + Eq + Ord + ?Sized,
    Self::Key: Borrow<Q>,
    Self::Key: Hash,
    Self::Key: Eq
[src]

Tries to get an element of an object as a usize

#[must_use]
fn as_u32(&self) -> Option<u32>
[src]

Tries to represent the value as an u32

#[must_use]
fn get_u32<Q>(&self, k: &Q) -> Option<u32> where
    Q: Hash + Eq + Ord + ?Sized,
    Self::Key: Borrow<Q>,
    Self::Key: Hash,
    Self::Key: Eq
[src]

Tries to get an element of an object as a u32

#[must_use]
fn as_u16(&self) -> Option<u16>
[src]

Tries to represent the value as an u16

#[must_use]
fn get_u16<Q>(&self, k: &Q) -> Option<u16> where
    Q: Hash + Eq + Ord + ?Sized,
    Self::Key: Borrow<Q>,
    Self::Key: Hash,
    Self::Key: Eq
[src]

Tries to get an element of an object as a u16

#[must_use]
fn as_u8(&self) -> Option<u8>
[src]

Tries to represent the value as an u8

#[must_use]
fn get_u8<Q>(&self, k: &Q) -> Option<u8> where
    Q: Hash + Eq + Ord + ?Sized,
    Self::Key: Borrow<Q>,
    Self::Key: Hash,
    Self::Key: Eq
[src]

Tries to get an element of an object as a u8

#[must_use]
fn get_f64<Q>(&self, k: &Q) -> Option<f64> where
    Q: Hash + Eq + Ord + ?Sized,
    Self::Key: Borrow<Q>,
    Self::Key: Hash,
    Self::Key: Eq
[src]

Tries to get an element of an object as a f64

#[must_use]
fn as_f32(&self) -> Option<f32>
[src]

Tries to represent the value as a f32

#[must_use]
fn get_f32<Q>(&self, k: &Q) -> Option<f32> where
    Q: Hash + Eq + Ord + ?Sized,
    Self::Key: Borrow<Q>,
    Self::Key: Hash,
    Self::Key: Eq
[src]

Tries to get an element of an object as a f32

#[must_use]
fn as_char(&self) -> Option<char>
[src]

Tries to represent the value as a Char

#[must_use]
fn get_str<Q>(&self, k: &Q) -> Option<&str> where
    Q: Hash + Eq + Ord + ?Sized,
    Self::Key: Borrow<Q>,
    Self::Key: Hash,
    Self::Key: Eq
[src]

Tries to get an element of an object as a str

#[must_use]
fn get_array<Q>(&self, k: &Q) -> Option<&<Self::Target as ValueAccess>::Array> where
    Q: Hash + Eq + Ord + ?Sized,
    Self::Key: Borrow<Q>,
    Self::Key: Hash,
    Self::Key: Eq
[src]

Tries to get an element of an object as a array

#[must_use]
fn get_object<Q>(&self, k: &Q) -> Option<&<Self::Target as ValueAccess>::Object> where
    Q: Hash + Eq + Ord + ?Sized,
    Self::Key: Borrow<Q>,
    Self::Key: Hash,
    Self::Key: Eq
[src]

Tries to get an element of an object as a object

impl Copy for StaticNode[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T> ToString for T where
    T: Display + ?Sized
[src]

pub default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.