Struct null

Source
pub struct null { /* private fields */ }
Expand description

value of Null type

Methods from Deref<Target = Any>§

Source

pub fn type_id(&self) -> TypeId

Returns the TypeId of the stored value.

Source

pub fn is_integer(&self) -> bool

Returns true if the type is an integer.

Source

pub fn is_float(&self) -> bool

Returns true if the type is a float.

Source

pub fn is_number(&self) -> bool

Returns true if the type is a number.

Source

pub fn is_nan(&self) -> bool

Returns true if the type is NaN.

Source

pub fn is_string(&self) -> bool

Returns true if the type is a string.

Source

pub fn is_array(&self) -> bool

Returns true if the type is an array.

Source

pub fn is_map(&self) -> bool

Returns true if the type is a map.

Source

pub fn is_null(&self) -> bool

Returns true if the type is null.

Source

pub fn is_boolean(&self) -> bool

Returns true if the type is a boolean.

Source

pub fn is_function(&self) -> bool

Returns true if the type is a function.

Source

pub fn is_pair(&self) -> bool

Returns true if the type is a pair.

Source

pub fn to_integer(&self) -> i64

Converts the type to an integer.

Source

pub fn to_float(&self) -> f64

Converts the type to a float.

Source

pub fn to_str(&self) -> String

Converts the type to a string.

Source

pub fn to_array(&self) -> Array

Converts the type to an array.

Source

pub fn to_map(&self) -> Map

Converts the type to a map.

Source

pub fn to_boolean(&self) -> bool

Converts the type to a boolean.

Source

pub fn to_pair(&self) -> Pair

Converts the type to a pair.

Source

pub fn to_function(&self) -> Function

Converts the type to a function.

Source

pub fn get(&self, key: impl Into<Any>) -> Any

Gets a value from the map.

Source

pub fn length(&self) -> Any

Returns the length of the collection.

Source

pub fn is_empty(&self) -> Any

Returns true if the collection is empty.

Source

pub fn call(&self, args: Any) -> Any

Calls the function with the specified arguments.

The first argument must be an Array object value.

Trait Implementations§

Source§

impl Deref for null

Source§

type Target = Any

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Any

Dereferences the value.
Source§

impl LazyStatic for null

Auto Trait Implementations§

§

impl Freeze for null

§

impl RefUnwindSafe for null

§

impl Send for null

§

impl Sync for null

§

impl Unpin for null

§

impl UnwindSafe for null

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> 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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
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.