[−][src]Enum rustc_target::abi::FieldPlacement
Describes how the fields of a type are located in memory.
Variants
Union(usize)
All fields start at no offset. The usize
is the field count.
In the case of primitives the number of fields is 0
.
Array
Array/vector-like placement, with all fields of identical types.
Fields of Array
Arbitrary
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
Methods
impl FieldPlacement
[src]
pub fn count(&self) -> usize
[src]
pub fn offset(&self, i: usize) -> Size
[src]
pub fn memory_index(&self, i: usize) -> usize
[src]
pub fn index_by_increasing_offset<'a>(
&'a self
) -> impl Iterator<Item = usize> + 'a
[src]
&'a self
) -> impl Iterator<Item = usize> + 'a
Gets source indices of the fields by increasing offsets.
Trait Implementations
impl PartialEq<FieldPlacement> for FieldPlacement
[src]
fn eq(&self, other: &FieldPlacement) -> bool
[src]
fn ne(&self, other: &FieldPlacement) -> bool
[src]
impl Eq for FieldPlacement
[src]
impl Debug for FieldPlacement
[src]
impl Hash for FieldPlacement
[src]
Auto Trait Implementations
impl Send for FieldPlacement
impl Sync for FieldPlacement
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<E> SpecializationError for E
[src]
default fn not_found<S, T>(
trait_name: &'static str,
method_name: &'static str
) -> E where
T: ?Sized,
[src]
trait_name: &'static str,
method_name: &'static str
) -> E where
T: ?Sized,
impl<T> Erased for T
[src]
impl<T> Send for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
T: ?Sized,