pub struct NonZeroLayout { /* private fields */ }Expand description
A Layout such that the size is never zero.
The distinction between zero sized layouts and any other layout is made because it makes little sense for an allocator to concern itself with zero sized allocations. That should be managed by the user of an allocator. This also saves a branch as the allocator doesn’t need to special case a zero sized allocation.
Implementations§
Trait Implementations§
Source§impl Clone for NonZeroLayout
impl Clone for NonZeroLayout
Source§fn clone(&self) -> NonZeroLayout
fn clone(&self) -> NonZeroLayout
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 NonZeroLayout
impl Debug for NonZeroLayout
Source§impl PartialEq for NonZeroLayout
impl PartialEq for NonZeroLayout
impl Copy for NonZeroLayout
impl Eq for NonZeroLayout
impl StructuralPartialEq for NonZeroLayout
Auto Trait Implementations§
impl Freeze for NonZeroLayout
impl RefUnwindSafe for NonZeroLayout
impl Send for NonZeroLayout
impl Sync for NonZeroLayout
impl Unpin for NonZeroLayout
impl UnwindSafe for NonZeroLayout
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