Struct zkgroup::common::serialization::VersionByte
source · pub struct VersionByte<const C: u8>;
Expand description
Constant version number C
as a type.
Zero-sized type that converts to and from for the value C
via Into
,
TryFrom
, Serialize
, and Deserialize
. Used for providing a version
tag at the beginning of serialized structs.
Trait Implementations§
source§impl<const C: u8> Clone for VersionByte<C>
impl<const C: u8> Clone for VersionByte<C>
source§fn clone(&self) -> VersionByte<C>
fn clone(&self) -> VersionByte<C>
Returns a copy 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<const C: u8> Debug for VersionByte<C>
impl<const C: u8> Debug for VersionByte<C>
source§impl<const C: u8> Default for VersionByte<C>
impl<const C: u8> Default for VersionByte<C>
source§fn default() -> VersionByte<C>
fn default() -> VersionByte<C>
Returns the “default value” for a type. Read more
source§impl<'de, const C: u8> Deserialize<'de> for VersionByte<C>
impl<'de, const C: u8> Deserialize<'de> for VersionByte<C>
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<const C: u8> From<VersionByte<C>> for u8
impl<const C: u8> From<VersionByte<C>> for u8
source§fn from(VersionByte: VersionByte<C>) -> Self
fn from(VersionByte: VersionByte<C>) -> Self
Converts to this type from the input type.
source§impl<const C: u8> PartialEq for VersionByte<C>
impl<const C: u8> PartialEq for VersionByte<C>
source§fn eq(&self, other: &VersionByte<C>) -> bool
fn eq(&self, other: &VersionByte<C>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<const C: u8> Serialize for VersionByte<C>
impl<const C: u8> Serialize for VersionByte<C>
impl<const C: u8> Copy for VersionByte<C>
impl<const C: u8> Eq for VersionByte<C>
impl<const C: u8> StructuralPartialEq for VersionByte<C>
Auto Trait Implementations§
impl<const C: u8> Freeze for VersionByte<C>
impl<const C: u8> RefUnwindSafe for VersionByte<C>
impl<const C: u8> Send for VersionByte<C>
impl<const C: u8> Sync for VersionByte<C>
impl<const C: u8> Unpin for VersionByte<C>
impl<const C: u8> UnwindSafe for VersionByte<C>
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
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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 more§impl<T> PartialDefault for Twhere
T: Default,
impl<T> PartialDefault for Twhere
T: Default,
§fn partial_default() -> T
fn partial_default() -> T
Returns a value that can be safely dropped or assigned over.