pub struct AttributeRepr {
pub kind: ReprKind,
pub align: Option<u64>,
pub packed: Option<u64>,
pub int: Option<String>,
}
Expand description
The contents of a #[repr(...)]
attribute.
Used in Attribute::Repr
.
Fields§
§kind: ReprKind
The representation, e.g. #[repr(C)]
, #[repr(transparent)]
align: Option<u64>
Alignment in bytes, if explicitly specified by #[repr(align(...)]
.
packed: Option<u64>
Alignment in bytes, if explicitly specified by #[repr(packed(...)]]
.
int: Option<String>
The integer type for an enum descriminant, if explicitly specified.
e.g. "i32"
, for #[repr(C, i32)]
Trait Implementations§
Source§impl Clone for AttributeRepr
impl Clone for AttributeRepr
Source§fn clone(&self) -> AttributeRepr
fn clone(&self) -> AttributeRepr
Returns a duplicate 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 moreSource§impl Debug for AttributeRepr
impl Debug for AttributeRepr
Source§impl<'de> Deserialize<'de> for AttributeRepr
impl<'de> Deserialize<'de> for AttributeRepr
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for AttributeRepr
impl PartialEq for AttributeRepr
Source§impl Serialize for AttributeRepr
impl Serialize for AttributeRepr
impl Eq for AttributeRepr
impl StructuralPartialEq for AttributeRepr
Auto Trait Implementations§
impl Freeze for AttributeRepr
impl RefUnwindSafe for AttributeRepr
impl Send for AttributeRepr
impl Sync for AttributeRepr
impl Unpin for AttributeRepr
impl UnwindSafe for AttributeRepr
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more