#[repr(u8)]pub enum EmptyStruct {
Zero = 0,
}Expand description
An empty struct’s wire representation. C/C++ memory layout rules (and hence FIDL wire rules) require every object to have a unique address so we have to make a single, tiny type for empty structs.
Variants§
Zero = 0
Empty structs are represented as a single 0u8.
Trait Implementations§
Source§impl Clone for EmptyStruct
impl Clone for EmptyStruct
Source§fn clone(&self) -> EmptyStruct
fn clone(&self) -> EmptyStruct
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 Constrained for EmptyStruct
impl Constrained for EmptyStruct
Source§type Constraint = ()
type Constraint = ()
Type of constraint information for this type.
Source§fn validate(
_: Slot<'_, Self>,
_: Self::Constraint,
) -> Result<(), ValidationError>
fn validate( _: Slot<'_, Self>, _: Self::Constraint, ) -> Result<(), ValidationError>
Validate a slot of this type against a constraint. Can be called when
pointers/envelopes are just presence markers.
Source§impl Debug for EmptyStruct
impl Debug for EmptyStruct
Source§impl Wire for EmptyStruct
impl Wire for EmptyStruct
Source§type Narrowed<'de> = EmptyStruct
type Narrowed<'de> = EmptyStruct
The narrowed wire type, restricted to the
'de lifetime.Source§fn zero_padding(_: &mut MaybeUninit<Self>)
fn zero_padding(_: &mut MaybeUninit<Self>)
Writes zeroes to the padding for this type, if any.
impl Copy for EmptyStruct
Auto Trait Implementations§
impl Freeze for EmptyStruct
impl RefUnwindSafe for EmptyStruct
impl Send for EmptyStruct
impl Sync for EmptyStruct
impl Unpin for EmptyStruct
impl UnwindSafe for EmptyStruct
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