Struct jlrs::value::union::Union [−][src]
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
fn cast(value: Value<'frame, 'data>) -> JlrsResult<Self::Output>
[src]
unsafe fn cast_unchecked(value: Value<'frame, 'data>) -> Self::Output
[src]
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]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'frame> Into<Value<'frame, 'static>> for Union<'frame>
[src]
impl<'frame> JuliaType for Union<'frame>
[src]
unsafe fn julia_type() -> *mut jl_datatype_t
[src]
impl<'frame> JuliaTypecheck for Union<'frame>
[src]
unsafe fn julia_typecheck(t: DataType<'_>) -> bool
[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]
unsafe fn valid_layout(v: Value<'_, '_>) -> bool
[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]
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,