Skip to main content

Undefined

Struct Undefined 

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

Fields§

§obj: JsValue

Implementations§

Trait Implementations§

Source§

impl AsRef<JsValue> for Undefined

Source§

fn as_ref(&self) -> &JsValue

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

impl BatchableResult for Undefined

Source§

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

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 Undefined

Source§

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

Source§

impl BinaryEncode for Undefined

Source§

fn encode(self, encoder: &mut EncodedData)

Source§

impl Clone for Undefined

Source§

fn clone(&self) -> Undefined

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 Undefined

Source§

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

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

impl Default for Undefined

Source§

fn default() -> Self

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

impl Display for Undefined

Source§

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

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

impl EncodeTypeDef for Undefined

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 Undefined

Source§

impl From<JsValue> for Undefined

Source§

fn from(obj: JsValue) -> Self

Converts to this type from the input type.
Source§

impl From<Undefined> for JsValue

Source§

fn from(value: Undefined) -> JsValue

Converts to this type from the input type.
Source§

impl IntoJsGeneric for Undefined

Source§

type JsCanon = Undefined

Source§

fn to_js(self) -> Self

Source§

impl JsCast for Undefined

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) -> Self

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

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

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 Undefined

Source§

fn eq(&self, other: &Undefined) -> 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 Undefined

Source§

impl StructuralPartialEq for Undefined

Source§

impl UpcastFrom<()> for Undefined

Source§

impl UpcastFrom<Undefined> for ()

Source§

impl<T> UpcastFrom<Undefined> for JsOption<T>

Source§

impl UpcastFrom<Undefined> for JsValue

Source§

impl UpcastFrom<Undefined> for Undefined

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, 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: Sized + ErasableGeneric<Repr = <Self as ErasableGeneric>::Repr>,

Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: Sized + ErasableGeneric<Repr = <Self as ErasableGeneric>::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,