pub enum Action {
    ArrayAlloc,
    ArrayFromValue {
        element_action: Box<Action>,
        old_offset: usize,
    },
    ArrayMap {
        element_action: Box<Action>,
        old_offset: usize,
    },
    Cast {
        old_ty: Type,
        old_offset: usize,
    },
    Copy {
        old_offset: usize,
        size: usize,
    },
    ElementFromArray {
        element_action: Box<Action>,
        old_offset: usize,
    },
    StructAlloc,
    StructMapFromGc {
        old_ty: Type,
        old_offset: usize,
    },
    StructMapFromValue {
        old_ty: Type,
        old_offset: usize,
    },
    StructMapInPlace {
        old_ty: Type,
        old_offset: usize,
    },
    ZeroInitialize,
}
Expand description

The Action to take when mapping memory from A to B.

Variants§

§

ArrayAlloc

Allocate a new array.

§

ArrayFromValue

Fields

§element_action: Box<Action>
§old_offset: usize

Allocate a new array and initialize it with a single value.

§

ArrayMap

Fields

§element_action: Box<Action>
§old_offset: usize

Allocate a new array and map values from an old array.

§

Cast

Fields

§old_ty: Type
§old_offset: usize

Cast a primitive type.

§

Copy

Fields

§old_offset: usize
§size: usize

Size in bytes

Copy bytes.

§

ElementFromArray

Fields

§element_action: Box<Action>
§old_offset: usize

Replace an array with its element type, copying its first element - if any. Otherwise, zero initialize the element.

§

StructAlloc

Allocate a new struct and ensure zero-initalization.

§

StructMapFromGc

Fields

§old_ty: Type
§old_offset: usize

Allocate a new struct and map from a heap-allocated struct.

§

StructMapFromValue

Fields

§old_ty: Type
§old_offset: usize

Allocate a new struct and map from a value struct.

§

StructMapInPlace

Fields

§old_ty: Type
§old_offset: usize

Map a value struct in-place.

§

ZeroInitialize

Ensure the memory is zero-initialized.

Trait Implementations§

Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.