pub struct SizeOfWriter { /* private fields */ }Expand description
A writer that only counts the size of the serialized data without actually writing it. Used to determine buffer size requirements before allocating memory.
Trait Implementations§
Source§impl Debug for SizeOfWriter
impl Debug for SizeOfWriter
Source§impl Default for SizeOfWriter
impl Default for SizeOfWriter
Source§fn default() -> SizeOfWriter
fn default() -> SizeOfWriter
Returns the “default value” for a type. Read more
Source§impl Fallible for SizeOfWriter
impl Fallible for SizeOfWriter
Source§impl Positional for SizeOfWriter
impl Positional for SizeOfWriter
Auto Trait Implementations§
impl Freeze for SizeOfWriter
impl RefUnwindSafe for SizeOfWriter
impl Send for SizeOfWriter
impl Sync for SizeOfWriter
impl Unpin for SizeOfWriter
impl UnsafeUnpin for SizeOfWriter
impl UnwindSafe for SizeOfWriter
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2where
T: SharedNiching<N1, N2>,
N1: Niching<T>,
N2: Niching<T>,
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2where
T: SharedNiching<N1, N2>,
N1: Niching<T>,
N2: Niching<T>,
§impl<T> Pointee for T
impl<T> Pointee for T
§impl<T, E> WriterExt<E> for Twhere
T: Writer<E> + ?Sized,
impl<T, E> WriterExt<E> for Twhere
T: Writer<E> + ?Sized,
§fn align(&mut self, align: usize) -> Result<usize, E>
fn align(&mut self, align: usize) -> Result<usize, E>
Aligns the position of the serializer to the given alignment.
§fn align_for<T>(&mut self) -> Result<usize, E>
fn align_for<T>(&mut self) -> Result<usize, E>
Aligns the position of the serializer to be suitable to write the given
type.