Struct runestick::Variant [−][src]
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
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,