Enum bilrost::Canonicity
source · #[repr(u8)]pub enum Canonicity {
NotCanonical = 0,
HasExtensions = 1,
Canonical = 2,
}
Expand description
Indicator of the “canonicity” of a decoded value or a decoding process that was performed.
Variants§
NotCanonical = 0
The decoded data was not represented in its canonical form.
HasExtensions = 1
All known fields were represented canonically, but some unknown fields were present.
Canonical = 2
The decoded data was fully canonical.
Implementations§
source§impl Canonicity
impl Canonicity
Trait Implementations§
source§impl Clone for Canonicity
impl Clone for Canonicity
source§fn clone(&self) -> Canonicity
fn clone(&self) -> Canonicity
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 Debug for Canonicity
impl Debug for Canonicity
source§impl FromIterator<Canonicity> for Canonicity
impl FromIterator<Canonicity> for Canonicity
source§fn from_iter<T: IntoIterator<Item = Canonicity>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = Canonicity>>(iter: T) -> Self
Creates a value from an iterator. Read more
source§impl Ord for Canonicity
impl Ord for Canonicity
source§fn cmp(&self, other: &Canonicity) -> Ordering
fn cmp(&self, other: &Canonicity) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for Canonicity
impl PartialEq for Canonicity
source§fn eq(&self, other: &Canonicity) -> bool
fn eq(&self, other: &Canonicity) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for Canonicity
impl PartialOrd for Canonicity
source§fn partial_cmp(&self, other: &Canonicity) -> Option<Ordering>
fn partial_cmp(&self, other: &Canonicity) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl WithCanonicity for &Canonicity
impl WithCanonicity for &Canonicity
type WithoutCanonicity = <&Canonicity as WithCanonicity>::Value
source§fn canonical(self) -> Result<(), DecodeErrorKind>
fn canonical(self) -> Result<(), DecodeErrorKind>
Get the value if it is fully canonical, otherwise returning an error.
source§fn canonical_with_extensions(self) -> Result<(), DecodeErrorKind>
fn canonical_with_extensions(self) -> Result<(), DecodeErrorKind>
Get the value as long as its known fields are canonical, otherwise returning an error.
source§impl WithCanonicity for Canonicity
impl WithCanonicity for Canonicity
type WithoutCanonicity = <Canonicity as WithCanonicity>::Value
source§fn canonical(self) -> Result<(), DecodeErrorKind>
fn canonical(self) -> Result<(), DecodeErrorKind>
Get the value if it is fully canonical, otherwise returning an error.
source§fn canonical_with_extensions(self) -> Result<(), DecodeErrorKind>
fn canonical_with_extensions(self) -> Result<(), DecodeErrorKind>
Get the value as long as its known fields are canonical, otherwise returning an error.
impl Copy for Canonicity
impl Eq for Canonicity
impl StructuralPartialEq for Canonicity
Auto Trait Implementations§
impl Freeze for Canonicity
impl RefUnwindSafe for Canonicity
impl Send for Canonicity
impl Sync for Canonicity
impl Unpin for Canonicity
impl UnwindSafe for Canonicity
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