pub struct Empty;Expand description
An empty object. Like () with a Codec.
Trait Implementations§
Source§impl NargDeserialize for Empty
impl NargDeserialize for Empty
Source§fn deserialize_from_narg(_buf: &mut &[u8]) -> VerificationResult<Self>
fn deserialize_from_narg(_buf: &mut &[u8]) -> VerificationResult<Self>
This map must compute the inverse of
NargSerialize::serialize_into_narg,
or return an error if a pre-image does not exist.Auto Trait Implementations§
impl Freeze for Empty
impl RefUnwindSafe for Empty
impl Send for Empty
impl Sync for Empty
impl Unpin for Empty
impl UnsafeUnpin for Empty
impl UnwindSafe for Empty
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T, E> Codec<T> for E
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> NargSerialize for Twhere
T: Encoding,
impl<T> NargSerialize for Twhere
T: Encoding,
Source§fn serialize_into_narg(&self, dst: &mut Vec<u8>)
fn serialize_into_narg(&self, dst: &mut Vec<u8>)
Serialization for byte strings is the identity map.
Source§fn serialize_into_new_narg(&self) -> impl AsRef<[u8]>
fn serialize_into_new_narg(&self) -> impl AsRef<[u8]>
Shorthand for
NargSerialize::serialize_into_narg for an empty byte array.