Skip to main content

Null

Struct Null 

Source
#[repr(transparent)]
pub struct Null { pub obj: JsValue, }

Fields§

§obj: JsValue

Implementations§

Trait Implementations§

Source§

impl AsRef<JsValue> for Null

Source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl BatchableResult for Null

Source§

fn try_placeholder(batch: &mut Runtime) -> Option<Null>

Returns Some(placeholder) for opaque types that can be batched, None for types that require flushing to get the actual value. Read more
Source§

impl BinaryDecode for Null

Source§

fn decode(decoder: &mut DecodedData<'_>) -> Result<Null, DecodeError>

Source§

impl BinaryEncode for Null

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl Clone for Null

Source§

fn clone(&self) -> Null

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Null

Source§

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

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

impl Default for Null

Source§

fn default() -> Null

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

impl Display for Null

Source§

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

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

impl EncodeTypeDef for Null

Source§

fn encode_type_def(buf: &mut Vec<u8>)

Encode this type’s definition into the buffer. For primitives, this is just the TypeTag byte. For callbacks, this includes param count, param types, and return type.
Source§

impl ErasableGeneric for Null

Source§

impl From<JsValue> for Null

Source§

fn from(obj: JsValue) -> Null

Converts to this type from the input type.
Source§

impl From<Null> for JsValue

Source§

fn from(value: Null) -> JsValue

Converts to this type from the input type.
Source§

impl IntoJsGeneric for Null

Source§

impl JsCast for Null

Source§

fn instanceof(value: &JsValue) -> bool

Check if a JsValue is an instance of this type. Read more
Source§

fn is_type_of(value: &JsValue) -> bool

Performs a dynamic type check to see whether the JsValue provided is a value of this type. Read more
Source§

fn unchecked_from_js(value: JsValue) -> Null

Unchecked cast from JsValue to this type. Read more
Source§

fn unchecked_from_js_ref(value: &JsValue) -> &Null

Unchecked cast from a JsValue reference to a reference of this type. Read more
Source§

fn has_type<T>(&self) -> bool
where T: JsCast,

Test whether this JS value has a type T. Read more
Source§

fn dyn_into<T>(self) -> Result<T, Self>
where T: JsCast,

Try to cast this value to type T. Read more
Source§

fn dyn_ref<T>(&self) -> Option<&T>
where T: JsCast,

Try to get a reference to type T from this value. Read more
Source§

fn is_instance_of<T>(&self) -> bool
where T: JsCast,

Test whether this JS value is an instance of the type T. Read more
Source§

fn unchecked_into<T>(self) -> T
where T: JsCast,

Unchecked cast to another type.
Source§

fn unchecked_ref<T>(&self) -> &T
where T: JsCast,

Unchecked cast to a reference of another type.
Source§

impl PartialEq for Null

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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 Eq for Null

Source§

impl StructuralPartialEq for Null

Source§

impl<T> UpcastFrom<Null> for JsOption<T>

Source§

impl UpcastFrom<Null> for JsValue

Source§

impl UpcastFrom<Null> 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 UnsafeUnpin 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> CloneToUninit for T
where T: Clone,

Source§

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

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

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromWasmAbi for T

Source§

unsafe fn from_abi(js: u32) -> Self
where Self: Sized + FromAbiId,

Recreate a JS-reference-like value from a heap id. Read more
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> IntoWasmAbi for T

Source§

fn into_abi(self) -> u32
where Self: Sized + IntoAbiId,

Source§

impl<T> RefFromBinaryDecode for T
where T: JsCast + 'static,

Source§

type Anchor = JsCastAnchor<T>

The anchor type that keeps the decoded reference valid.
Source§

fn ref_decode( _decoder: &mut DecodedData<'_>, ) -> Result<<T as RefFromBinaryDecode>::Anchor, DecodeError>

Decode a reference anchor from binary data.
Source§

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

Source§

unsafe fn ref_from_abi(js: u32) -> AbiRef<Self>
where Self: Sized + FromAbiId,

Recreate a non-dropping reference anchor from a heap id. Read more
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§

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> TryFromJsValue for T
where T: JsCast,

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<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: ErasableGeneric<Repr = Self::Repr>,

Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: ErasableGeneric<Repr = Self::Repr>,

Source§

impl<T> JsGeneric for T

Source§

impl<T> OptionFromWasmAbi for T
where T: FromWasmAbi,

Source§

impl<T> OptionIntoWasmAbi for T
where T: IntoWasmAbi,

Source§

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