Enum mun_hir::StructMemoryKind
pub enum StructMemoryKind {
Gc,
Value,
}
Expand description
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
impl Clone for StructMemoryKind
§fn clone(&self) -> StructMemoryKind
fn clone(&self) -> StructMemoryKind
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl Debug for StructMemoryKind
impl Debug for StructMemoryKind
§impl Default for StructMemoryKind
impl Default for StructMemoryKind
§fn default() -> StructMemoryKind
fn default() -> StructMemoryKind
Returns the “default value” for a type. Read more
§impl PartialEq<StructMemoryKind> for StructMemoryKind
impl PartialEq<StructMemoryKind> for StructMemoryKind
§fn eq(&self, other: &StructMemoryKind) -> bool
fn eq(&self, other: &StructMemoryKind) -> bool
impl Copy for StructMemoryKind
impl Eq for StructMemoryKind
impl StructuralEq for StructMemoryKind
impl StructuralPartialEq for StructMemoryKind
Auto Trait Implementations§
impl RefUnwindSafe for StructMemoryKind
impl Send for StructMemoryKind
impl Sync for StructMemoryKind
impl Unpin for StructMemoryKind
impl UnwindSafe for StructMemoryKind
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.