#[non_exhaustive]pub enum Canonicality {
Canonical,
NonCanonical {
offset: usize,
message: String,
},
}Expand description
Result of metainfo-only validation. Canonical encoding status for parseable source bytes.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Canonical
The original bytes are canonical bencode.
NonCanonical
The original bytes are parseable but not canonical.
Implementations§
Source§impl Canonicality
impl Canonicality
Trait Implementations§
Source§impl Clone for Canonicality
impl Clone for Canonicality
Source§fn clone(&self) -> Canonicality
fn clone(&self) -> Canonicality
Returns a duplicate 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 Canonicality
impl Debug for Canonicality
Source§impl Default for Canonicality
impl Default for Canonicality
Source§fn default() -> Canonicality
fn default() -> Canonicality
Returns the “default value” for a type. Read more
Source§impl PartialEq for Canonicality
impl PartialEq for Canonicality
impl Eq for Canonicality
impl StructuralPartialEq for Canonicality
Auto Trait Implementations§
impl Freeze for Canonicality
impl RefUnwindSafe for Canonicality
impl Send for Canonicality
impl Sync for Canonicality
impl Unpin for Canonicality
impl UnwindSafe for Canonicality
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