Skip to main content

Unpacked

Enum Unpacked 

Source
pub enum Unpacked<A: IVm> {
    Nullish(Nullish),
    Boolean(bool),
    Number(Number),
    String(String<A>),
    BigInt(BigInt<A>),
    Object(Object<A>),
    Array(Array<A>),
    Function(Function<A>),
}

Variants§

§

Nullish(Nullish)

§

Boolean(bool)

§

Number(Number)

§

String(String<A>)

§

BigInt(BigInt<A>)

§

Object(Object<A>)

§

Array(Array<A>)

§

Function(Function<A>)

Implementations§

Source§

impl<A: IVm> Unpacked<A>

Source

pub fn is_nullish(&self) -> bool

Whether this is undefined or null: the one place the match is written. A match, never Nullish::try_from, which builds and discards an error value for every value that is not nullish, the common answer.

Source

pub fn is_undefined(&self) -> bool

Whether this is undefined, and not null: the absent value an optional argument takes its default on. A match, as is_nullish is.

Source

pub fn dispatch<T: Dispatch<A>>(self, o: T) -> T::Result

Trait Implementations§

Source§

impl<A: Clone + IVm> Clone for Unpacked<A>

Source§

fn clone(&self) -> Unpacked<A>

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<A: IVm> Debug for Unpacked<A>

Source§

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

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

impl<A: IVm> From<Any<A>> for Unpacked<A>

Source§

fn from(v: Any<A>) -> Self

Converts to this type from the input type.
Source§

impl<A: IVm> From<Array<A>> for Unpacked<A>

Source§

fn from(value: Array<A>) -> Self

Converts to this type from the input type.
Source§

impl<A: IVm> From<BigInt<A>> for Unpacked<A>

Source§

fn from(value: BigInt<A>) -> Self

Converts to this type from the input type.
Source§

impl<A: IVm> From<Function<A>> for Unpacked<A>

Source§

fn from(value: Function<A>) -> Self

Converts to this type from the input type.
Source§

impl<A: IVm> From<Nullish> for Unpacked<A>

Source§

fn from(value: Nullish) -> Self

Converts to this type from the input type.
Source§

impl<A: IVm> From<Number> for Unpacked<A>

Source§

fn from(value: Number) -> Self

Converts to this type from the input type.
Source§

impl<A: IVm> From<Object<A>> for Unpacked<A>

Source§

fn from(value: Object<A>) -> Self

Converts to this type from the input type.
Source§

impl<A: IVm> From<String<A>> for Unpacked<A>

Source§

fn from(value: String<A>) -> Self

Converts to this type from the input type.
Source§

impl<A: IVm> From<Unpacked<A>> for Any<A>

Source§

fn from(value: Unpacked<A>) -> Self

Converts to this type from the input type.
Source§

impl<A: IVm> From<bool> for Unpacked<A>

Source§

fn from(value: bool) -> Self

Converts to this type from the input type.
Source§

impl<A: IVm> From<f64> for Unpacked<A>

Source§

fn from(value: f64) -> Self

Converts to this type from the input type.
Source§

impl<A: IVm> PartialEq for Unpacked<A>

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more

Auto Trait Implementations§

§

impl<A> Freeze for Unpacked<A>

§

impl<A> RefUnwindSafe for Unpacked<A>

§

impl<A> Send for Unpacked<A>

§

impl<A> Sync for Unpacked<A>

§

impl<A> Unpin for Unpacked<A>

§

impl<A> UnsafeUnpin for Unpacked<A>

§

impl<A> UnwindSafe for Unpacked<A>

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, 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> ToAny for T

Source§

fn to_any<A: IVm>(self) -> Any<A>
where Self: Into<Unpacked<A>>,

Source§

impl<T> ToArray for T

Source§

fn to_array<A: IVm>(self) -> Array<A>
where Self: Sized + IntoIterator<Item = Any<A>>,

Source§

impl<T> ToObject for T

Source§

fn to_object<A: IVm>(self) -> Object<A>
where Self: Sized + IntoIterator<Item = Property<A>>,

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

Source§

fn try_to_string<A: IVm>(self) -> Result<String<A>, Any<A>>
where Self: Sized + IntoIterator<Item = Result<u16, Any<A>>>,

Source§

fn to_string<A: IVm>(self) -> String<A>
where Self: Sized + IntoIterator<Item = u16>,

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.