pub struct NonTrackingSize(/* private fields */);Expand description
A size tracker that does not actually track the size (zero overhead).
Carries a PhantomData instead of being a unit struct so that containers using it stay
FFI-safe when embedded in #[repr(C)] structs named in extern signatures:
improper_ctypes rejects fieldless structs but ignores PhantomData.
Trait Implementations§
Source§impl Clone for NonTrackingSize
impl Clone for NonTrackingSize
impl Copy for NonTrackingSize
Source§impl SizeTracker for NonTrackingSize
impl SizeTracker for NonTrackingSize
Source§const IS_TRACKING: bool = false
const IS_TRACKING: bool = false
True if this tracker actually tracks the size.
Auto Trait Implementations§
impl Freeze for NonTrackingSize
impl RefUnwindSafe for NonTrackingSize
impl Send for NonTrackingSize
impl Sync for NonTrackingSize
impl Unpin for NonTrackingSize
impl UnsafeUnpin for NonTrackingSize
impl UnwindSafe for NonTrackingSize
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DTwhere
ST: ?Sized,
DT: ?Sized,
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DTwhere
ST: ?Sized,
DT: ?Sized,
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
Source§impl<T> PinInit<T> for T
impl<T> PinInit<T> for T
Source§unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), !>
unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), !>
Initializes
slot. Read moreSource§fn pin_chain<F>(self, f: F) -> ChainPinInit<Self, F, T, E>where
F: FnOnce(Pin<&mut T>) -> Result<(), E>,
fn pin_chain<F>(self, f: F) -> ChainPinInit<Self, F, T, E>where
F: FnOnce(Pin<&mut T>) -> Result<(), E>,
First initializes the value using
self then calls the function f with the initialized
value. Read more