Enum rustc_target::abi::FieldPlacement [−][src]
pub enum FieldPlacement {
Union(usize),
Array {
stride: Size,
count: u64,
},
Arbitrary {
offsets: Vec<Size>,
memory_index: Vec<u32>,
},
}🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Describes how the fields of a type are located in memory.
Variants
Union(usize)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
All fields start at no offset. The usize is the field count.
In the case of primitives the number of fields is 0.
Array🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Array/vector-like placement, with all fields of identical types.
Fields of Array
stride: Size | 🔬 This is a nightly-only experimental API. ( |
count: u64 | 🔬 This is a nightly-only experimental API. ( |
Arbitrary🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Struct-like placement, with precomputed offsets.
Fields are guaranteed to not overlap, but note that gaps before, between and after all the fields are NOT always padding, and as such their contents may not be discarded. For example, enum variants leave a gap at the start, where the discriminant field in the enum layout goes.
Fields of Arbitrary
offsets: Vec<Size> | 🔬 This is a nightly-only experimental API. ( |
memory_index: Vec<u32> | 🔬 This is a nightly-only experimental API. ( |
Methods
impl FieldPlacement[src]
impl FieldPlacementpub fn count(&self) -> usize[src]
pub fn count(&self) -> usize🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn offset(&self, i: usize) -> Size[src]
pub fn offset(&self, i: usize) -> Size🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn memory_index(&self, i: usize) -> usize[src]
pub fn memory_index(&self, i: usize) -> usize🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn index_by_increasing_offset<'a>(&'a self) -> <'a>[src]
pub fn index_by_increasing_offset<'a>(&'a self) -> <'a>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Get source indices of the fields by increasing offsets.
Trait Implementations
impl PartialEq for FieldPlacement[src]
impl PartialEq for FieldPlacementfn eq(&self, other: &FieldPlacement) -> bool[src]
fn eq(&self, other: &FieldPlacement) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &FieldPlacement) -> bool[src]
fn ne(&self, other: &FieldPlacement) -> boolThis method tests for !=.
impl Eq for FieldPlacement[src]
impl Eq for FieldPlacementfn assert_receiver_is_total_eq(&self)[src]
fn assert_receiver_is_total_eq(&self)impl Hash for FieldPlacement[src]
impl Hash for FieldPlacementfn hash<__H: Hasher>(&self, state: &mut __H)[src]
fn hash<__H: Hasher>(&self, state: &mut __H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl Debug for FieldPlacement[src]
impl Debug for FieldPlacementAuto Trait Implementations
impl Send for FieldPlacement
impl Send for FieldPlacementimpl Sync for FieldPlacement
impl Sync for FieldPlacement