Enum mun_syntax::ast::StructMemoryKind[][src]

#[repr(u8)]pub enum StructMemoryKind {
    GC,
    Value,
}

Represents the kind of memory management a struct uses.

Variants

GC

A garbage collected struct is allocated on the heap and uses reference semantics when passed around.

Value

A value struct is allocated on the stack and uses value semantics when passed around.

NOTE: When a value struct is used in an external API, a wrapper is created that pins the value on the heap. The heap-allocated value needs to be manually deallocated!

Trait Implementations

impl Clone for StructMemoryKind[src]

impl Debug for StructMemoryKind[src]

impl Default for StructMemoryKind[src]

impl Eq for StructMemoryKind[src]

impl PartialEq<StructMemoryKind> for StructMemoryKind[src]

impl StructuralEq for StructMemoryKind[src]

impl StructuralPartialEq for StructMemoryKind[src]

Auto Trait Implementations

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.