simd_json::value

Enum StaticNode

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

Static tape node

Variants§

§

I64(i64)

A signed 64 bit integer.

§

U64(u64)

An unsigned 64 bit integer.

§

F64(f64)

A floating point value

§

Bool(bool)

A boolean value

§

Null

The null value

Trait Implementations§

Source§

impl Clone for StaticNode

Source§

fn clone(&self) -> StaticNode

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for StaticNode

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for StaticNode

Source§

fn default() -> StaticNode

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

impl Display for StaticNode

Source§

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

Formats the value using the given formatter. Read more
Source§

impl From<()> for StaticNode

Source§

fn from(_b: ()) -> StaticNode

Converts to this type from the input type.
Source§

impl From<StaticNode> for Value

Source§

fn from(s: StaticNode) -> Self

Converts to this type from the input type.
Source§

impl<'borrow, 'tape, 'value> From<StaticNode> for Value<'borrow, 'tape, 'value>

Source§

fn from(v: StaticNode) -> Self

Converts to this type from the input type.
Source§

impl<'value> From<StaticNode> for Value<'value>

Source§

fn from(s: StaticNode) -> Self

Converts to this type from the input type.
Source§

impl From<bool> for StaticNode

Source§

fn from(b: bool) -> StaticNode

Converts to this type from the input type.
Source§

impl From<f32> for StaticNode

Source§

fn from(f: f32) -> StaticNode

Converts to this type from the input type.
Source§

impl From<f64> for StaticNode

Source§

fn from(f: f64) -> StaticNode

Converts to this type from the input type.
Source§

impl From<i16> for StaticNode

Source§

fn from(i: i16) -> StaticNode

Converts to this type from the input type.
Source§

impl From<i32> for StaticNode

Source§

fn from(i: i32) -> StaticNode

Converts to this type from the input type.
Source§

impl From<i64> for StaticNode

Source§

fn from(i: i64) -> StaticNode

Converts to this type from the input type.
Source§

impl From<i8> for StaticNode

Source§

fn from(i: i8) -> StaticNode

Converts to this type from the input type.
Source§

impl From<u16> for StaticNode

Source§

fn from(i: u16) -> StaticNode

Converts to this type from the input type.
Source§

impl From<u32> for StaticNode

Source§

fn from(i: u32) -> StaticNode

Converts to this type from the input type.
Source§

impl From<u64> for StaticNode

Source§

fn from(i: u64) -> StaticNode

Converts to this type from the input type.
Source§

impl From<u8> for StaticNode

Source§

fn from(i: u8) -> StaticNode

Converts to this type from the input type.
Source§

impl From<usize> for StaticNode

Source§

fn from(i: usize) -> StaticNode

Converts to this type from the input type.
Source§

impl Index<&str> for StaticNode

Source§

type Output = ()

The returned type after indexing.
Source§

fn index(&self, _index: &str) -> &<StaticNode as Index<&str>>::Output

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

impl Index<usize> for StaticNode

Source§

type Output = ()

The returned type after indexing.
Source§

fn index(&self, _index: usize) -> &<StaticNode as Index<usize>>::Output

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

impl IndexMut<&str> for StaticNode

Source§

fn index_mut( &mut self, _index: &str, ) -> &mut <StaticNode as Index<&str>>::Output

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

impl IndexMut<usize> for StaticNode

Source§

fn index_mut( &mut self, _index: usize, ) -> &mut <StaticNode as Index<usize>>::Output

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

impl PartialEq<&str> for StaticNode

Source§

fn eq(&self, other: &&str) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<()> for StaticNode

Source§

fn eq(&self, _other: &()) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<String> for StaticNode

Source§

fn eq(&self, other: &String) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<bool> for StaticNode

Source§

fn eq(&self, other: &bool) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<f32> for StaticNode

Source§

fn eq(&self, other: &f32) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<f64> for StaticNode

Source§

fn eq(&self, other: &f64) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<i128> for StaticNode

Source§

fn eq(&self, other: &i128) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<i16> for StaticNode

Source§

fn eq(&self, other: &i16) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<i32> for StaticNode

Source§

fn eq(&self, other: &i32) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<i64> for StaticNode

Source§

fn eq(&self, other: &i64) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<i8> for StaticNode

Source§

fn eq(&self, other: &i8) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<str> for StaticNode

Source§

fn eq(&self, other: &str) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<u128> for StaticNode

Source§

fn eq(&self, other: &u128) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<u16> for StaticNode

Source§

fn eq(&self, other: &u16) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<u32> for StaticNode

Source§

fn eq(&self, other: &u32) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<u64> for StaticNode

Source§

fn eq(&self, other: &u64) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<u8> for StaticNode

Source§

fn eq(&self, other: &u8) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<usize> for StaticNode

Source§

fn eq(&self, other: &usize) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq for StaticNode

Source§

fn eq(&self, other: &StaticNode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TypedValue for StaticNode

Source§

fn value_type(&self) -> ValueType

Gets the type of the current value
Source§

impl ValueAsScalar for StaticNode

Source§

fn as_null(&self) -> Option<()>

Tries to represent the value as a ‘null’;
Source§

fn as_bool(&self) -> Option<bool>

Tries to represent the value as a bool
Source§

fn as_i64(&self) -> Option<i64>

Tries to represent the value as an i64
Source§

fn as_u64(&self) -> Option<u64>

Tries to represent the value as an u64
Source§

fn as_f64(&self) -> Option<f64>

Tries to represent the value as a f64
Source§

fn cast_f64(&self) -> Option<f64>

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

fn as_str(&self) -> Option<&str>

Tries to represent the value as a &str
Source§

fn as_i128(&self) -> Option<i128>

Tries to represent the value as an i128
Source§

fn as_i32(&self) -> Option<i32>

Tries to represent the value as an i32
Source§

fn as_i16(&self) -> Option<i16>

Tries to represent the value as an i16
Source§

fn as_i8(&self) -> Option<i8>

Tries to represent the value as an i8
Source§

fn as_u128(&self) -> Option<u128>

Tries to represent the value as an u128
Source§

fn as_usize(&self) -> Option<usize>

Tries to represent the value as an usize
Source§

fn as_u32(&self) -> Option<u32>

Tries to represent the value as an u32
Source§

fn as_u16(&self) -> Option<u16>

Tries to represent the value as an u16
Source§

fn as_u8(&self) -> Option<u8>

Tries to represent the value as an u8
Source§

fn as_f32(&self) -> Option<f32>

Tries to represent the value as a f32
Source§

fn as_char(&self) -> Option<char>

Tries to represent the value as a Char
Source§

impl Copy for StaticNode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T> ToString for T
where T: Display + ?Sized,

Source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T> TypedScalarValue for T
where T: ValueAsScalar,

Source§

fn is_null(&self) -> bool

returns true if the current value is null
Source§

fn is_float(&self) -> bool

returns true if the current value a floatingpoint number
Source§

fn is_integer(&self) -> bool

returns true if the current value a integer number
Source§

fn is_number(&self) -> bool

returns true if the current value a number either float or intege
Source§

fn is_bool(&self) -> bool

returns true if the current value a bool
Source§

fn is_i128(&self) -> bool

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

fn is_i64(&self) -> bool

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

fn is_i32(&self) -> bool

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

fn is_i16(&self) -> bool

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

fn is_i8(&self) -> bool

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

fn is_u128(&self) -> bool

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

fn is_u64(&self) -> bool

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

fn is_usize(&self) -> bool

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

fn is_u32(&self) -> bool

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

fn is_u16(&self) -> bool

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

fn is_u8(&self) -> bool

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

fn is_f64(&self) -> bool

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

fn is_f64_castable(&self) -> bool

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

fn is_f32(&self) -> bool

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

fn is_str(&self) -> bool

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

fn is_char(&self) -> bool

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

impl<T> ValueTryAsScalar for T

Source§

fn try_as_bool(&self) -> Result<bool, TryTypeError>

Tries to represent the value as a bool Read more
Source§

fn try_as_i128(&self) -> Result<i128, TryTypeError>

Tries to represent the value as a i128 Read more
Source§

fn try_as_i64(&self) -> Result<i64, TryTypeError>

Tries to represent the value as an i64 Read more
Source§

fn try_as_i32(&self) -> Result<i32, TryTypeError>

Tries to represent the value as an i32 Read more
Source§

fn try_as_i16(&self) -> Result<i16, TryTypeError>

Tries to represent the value as an i16 Read more
Source§

fn try_as_i8(&self) -> Result<i8, TryTypeError>

Tries to represent the value as an i8 Read more
Source§

fn try_as_u128(&self) -> Result<u128, TryTypeError>

Tries to represent the value as an u128 Read more
Source§

fn try_as_u64(&self) -> Result<u64, TryTypeError>

Tries to represent the value as an u64 Read more
Source§

fn try_as_usize(&self) -> Result<usize, TryTypeError>

Tries to represent the value as an usize Read more
Source§

fn try_as_u32(&self) -> Result<u32, TryTypeError>

Tries to represent the value as an u32 Read more
Source§

fn try_as_u16(&self) -> Result<u16, TryTypeError>

Tries to represent the value as an u16 Read more
Source§

fn try_as_u8(&self) -> Result<u8, TryTypeError>

Tries to represent the value as an u8 Read more
Source§

fn try_as_f64(&self) -> Result<f64, TryTypeError>

Tries to represent the value as a f64 Read more
Source§

fn try_cast_f64(&self) -> Result<f64, TryTypeError>

Tries to Casts the current value to a f64 if possible, this will turn integer values into floats and error if it isn’t possible Read more
Source§

fn try_as_f32(&self) -> Result<f32, TryTypeError>

Tries to represent the value as a f32 Read more
Source§

fn try_as_str(&self) -> Result<&str, TryTypeError>

Tries to represent the value as a &str Read more
Source§

fn try_as_char(&self) -> Result<char, TryTypeError>

Tries to represent the value as a Char Read more