Struct runestick::Variant[][src]

pub struct Variant { /* fields omitted */ }

The variant of a type.

Implementations

impl Variant[src]

pub fn unit(rtti: Arc<VariantRtti>) -> Self[src]

Construct a unit variant.

pub fn tuple(rtti: Arc<VariantRtti>, tuple: Tuple) -> Self[src]

Construct a tuple variant.

pub fn struct_(rtti: Arc<VariantRtti>, data: Object) -> Self[src]

Construct a struct variant.

pub fn rtti(&self) -> &VariantRtti[src]

Access the rtti of the variant.

pub fn data(&self) -> &VariantData[src]

Access the underlying variant data.

pub fn data_mut(&mut self) -> &mut VariantData[src]

Access the underlying variant data mutably.

pub fn type_info(&self) -> TypeInfo[src]

Get type info for the variant.

Trait Implementations

impl Debug for Variant[src]

impl From<Variant> for Value[src]

impl ToValue for Variant[src]

Auto Trait Implementations

impl !RefUnwindSafe for Variant

impl !Send for Variant

impl !Sync for Variant

impl Unpin for Variant

impl !UnwindSafe for Variant

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.