pub struct DecodeSlot<T> { /* private fields */ }Available on crate feature
serde only.Expand description
Re-export of the nextjson format-neutral contracts used by tzcraft.
Available as tzcraft::codec::NsonSerialize and friends so downstream
code can write tzcraft::codec::nextencode(...) without naming nextjson
directly.
Safe caller-provided storage used by NsonDeserialize::nextdecode_into.
The value starts uninitialized, but unlike a public MaybeUninit<T>
contract it cannot be read before a successful write.
Incorrect third-party implementations therefore cannot cause undefined
behavior in safe code.
Implementations§
Source§impl<T> DecodeSlot<T>
impl<T> DecodeSlot<T>
Sourcepub const fn new() -> DecodeSlot<T>
pub const fn new() -> DecodeSlot<T>
Create an empty nextdecode slot.
Sourcepub fn is_initialized(&self) -> bool
pub fn is_initialized(&self) -> bool
Return whether the slot currently contains a value.
Trait Implementations§
Source§impl<T> Default for DecodeSlot<T>
impl<T> Default for DecodeSlot<T>
Source§fn default() -> DecodeSlot<T>
fn default() -> DecodeSlot<T>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<T> Freeze for DecodeSlot<T>
impl<T> RefUnwindSafe for DecodeSlot<T>where
Option<T>: RefUnwindSafe,
impl<T> Send for DecodeSlot<T>
impl<T> Sync for DecodeSlot<T>
impl<T> Unpin for DecodeSlot<T>
impl<T> UnsafeUnpin for DecodeSlot<T>where
Option<T>: UnsafeUnpin,
impl<T> UnwindSafe for DecodeSlot<T>where
Option<T>: UnwindSafe,
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