Struct jlrs::value::union::Union[][src]

#[repr(transparent)]pub struct Union<'frame>(_, _);

A struct field can have a type that's a union of several types. In this case, the type of this field is an instance of Union.

Implementations

impl<'frame> Union<'frame>[src]

pub fn isbitsunion(self) -> bool[src]

Returns true if all the isbits union optimization applies to this union type.

pub fn isbits_size_align(self, size: &mut usize, align: &mut usize) -> bool[src]

Returns true if the isbits union optimization applies to this union type and calculates the size and aligment if it does. If this method returns false, the calculated size and alignment are invalid.

pub fn size(self) -> usize[src]

Returns the size of a field that is of this Union type excluding the flag that is used in bits unions.

pub fn a(self) -> Value<'frame, 'static>[src]

Unions are stored as binary trees, the arguments are stored as its leaves. This method returns one of its branches.

pub fn b(self) -> Value<'frame, 'static>[src]

Unions are stored as binary trees, the arguments are stored as its leaves. This method returns one of its branches.

pub fn as_value(self) -> Value<'frame, 'static>[src]

Convert self to a Value.

Trait Implementations

impl<'frame, 'data> Cast<'frame, 'data> for Union<'frame>[src]

type Output = Self

impl<'frame> Clone for Union<'frame>[src]

impl<'frame> Copy for Union<'frame>[src]

impl<'frame> Eq for Union<'frame>[src]

impl<'frame> Hash for Union<'frame>[src]

impl<'frame> Into<Value<'frame, 'static>> for Union<'frame>[src]

impl<'frame> JuliaType for Union<'frame>[src]

impl<'frame> JuliaTypecheck for Union<'frame>[src]

impl<'frame> PartialEq<Union<'frame>> for Union<'frame>[src]

impl<'frame> StructuralEq for Union<'frame>[src]

impl<'frame> StructuralPartialEq for Union<'frame>[src]

impl<'frame> ValidLayout for Union<'frame>[src]

Auto Trait Implementations

impl<'frame> RefUnwindSafe for Union<'frame>[src]

impl<'frame> !Send for Union<'frame>[src]

impl<'frame> !Sync for Union<'frame>[src]

impl<'frame> Unpin for Union<'frame>[src]

impl<'frame> UnwindSafe for Union<'frame>[src]

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.