Struct rustc::ty::layout::Union
[−]
[src]
pub struct Union {
pub align: Align,
pub min_size: Size,
pub packed: bool,
}🔬 This is a nightly-only experimental API. (
rustc_private)An untagged union.
Fields
align: Align
🔬 This is a nightly-only experimental API. (
rustc_private)min_size: Size
🔬 This is a nightly-only experimental API. (
rustc_private)packed: bool
🔬 This is a nightly-only experimental API. (
rustc_private)If true, no alignment padding is used.
Methods
impl<'a, 'gcx, 'tcx> Union[src]
fn new(dl: &TargetDataLayout, packed: bool) -> Union
🔬 This is a nightly-only experimental API. (
rustc_private)fn extend<I>(&mut self,
dl: &TargetDataLayout,
fields: I,
scapegoat: Ty<'gcx>)
-> Result<(), LayoutError<'gcx>> where I: Iterator<Item=Result<&'a Layout, LayoutError<'gcx>>>
dl: &TargetDataLayout,
fields: I,
scapegoat: Ty<'gcx>)
-> Result<(), LayoutError<'gcx>> where I: Iterator<Item=Result<&'a Layout, LayoutError<'gcx>>>
🔬 This is a nightly-only experimental API. (
rustc_private)Extend the Struct with more fields.
fn stride(&self) -> Size
🔬 This is a nightly-only experimental API. (
rustc_private)Get the size with trailing alignment padding.
Trait Implementations
impl PartialEq for Union[src]
fn eq(&self, __arg_0: &Union) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &Union) -> bool
This method tests for !=.
impl Eq for Union[src]
impl Hash for Union[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher1.3.0
Feeds a slice of this type into the state provided.