#[repr(u8)]pub enum ProvenanceMarkResolution {
Low = 0,
Medium = 1,
Quartile = 2,
High = 3,
}Variants§
Implementations§
Source§impl ProvenanceMarkResolution
impl ProvenanceMarkResolution
pub fn link_length(&self) -> usize
pub fn seq_bytes_length(&self) -> usize
pub fn date_bytes_length(&self) -> usize
pub fn fixed_length(&self) -> usize
pub fn key_range(&self) -> Range<usize>
pub fn chain_id_range(&self) -> Range<usize>
pub fn hash_range(&self) -> Range<usize>
pub fn seq_bytes_range(&self) -> Range<usize>
pub fn date_bytes_range(&self) -> Range<usize>
pub fn info_range(&self) -> RangeFrom<usize>
Sourcepub fn serialize_date(&self, date: Date) -> Result<Vec<u8>>
pub fn serialize_date(&self, date: Date) -> Result<Vec<u8>>
Serializes a Date into bytes based on the resolution.
Sourcepub fn deserialize_date(&self, data: &[u8]) -> Result<Date>
pub fn deserialize_date(&self, data: &[u8]) -> Result<Date>
Deserializes bytes into a Date based on the resolution.
Sourcepub fn serialize_seq(&self, seq: u32) -> Result<Vec<u8>>
pub fn serialize_seq(&self, seq: u32) -> Result<Vec<u8>>
Serializes a sequence number into bytes based on the resolution.
Sourcepub fn deserialize_seq(&self, data: &[u8]) -> Result<u32>
pub fn deserialize_seq(&self, data: &[u8]) -> Result<u32>
Deserializes bytes into a sequence number based on the resolution.
Trait Implementations§
Source§impl Clone for ProvenanceMarkResolution
impl Clone for ProvenanceMarkResolution
Source§fn clone(&self) -> ProvenanceMarkResolution
fn clone(&self) -> ProvenanceMarkResolution
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 ProvenanceMarkResolution
impl Debug for ProvenanceMarkResolution
Source§impl<'de> Deserialize<'de> for ProvenanceMarkResolution
impl<'de> Deserialize<'de> for ProvenanceMarkResolution
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 Display for ProvenanceMarkResolution
impl Display for ProvenanceMarkResolution
Source§impl From<ProvenanceMarkResolution> for CBOR
impl From<ProvenanceMarkResolution> for CBOR
Source§fn from(res: ProvenanceMarkResolution) -> Self
fn from(res: ProvenanceMarkResolution) -> Self
Converts to this type from the input type.
Source§impl From<ProvenanceMarkResolution> for u8
impl From<ProvenanceMarkResolution> for u8
Source§fn from(res: ProvenanceMarkResolution) -> Self
fn from(res: ProvenanceMarkResolution) -> Self
Converts to this type from the input type.
Source§impl Hash for ProvenanceMarkResolution
impl Hash for ProvenanceMarkResolution
Source§impl PartialEq for ProvenanceMarkResolution
impl PartialEq for ProvenanceMarkResolution
Source§impl Serialize for ProvenanceMarkResolution
impl Serialize for ProvenanceMarkResolution
Source§impl TryFrom<CBOR> for ProvenanceMarkResolution
impl TryFrom<CBOR> for ProvenanceMarkResolution
Source§impl TryFrom<u8> for ProvenanceMarkResolution
impl TryFrom<u8> for ProvenanceMarkResolution
impl Copy for ProvenanceMarkResolution
impl Eq for ProvenanceMarkResolution
impl StructuralPartialEq for ProvenanceMarkResolution
Auto Trait Implementations§
impl Freeze for ProvenanceMarkResolution
impl RefUnwindSafe for ProvenanceMarkResolution
impl Send for ProvenanceMarkResolution
impl Sync for ProvenanceMarkResolution
impl Unpin for ProvenanceMarkResolution
impl UnwindSafe for ProvenanceMarkResolution
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> CBORDecodable for T
impl<T> CBORDecodable for T
Source§impl<T> CBOREncodable for T
impl<T> CBOREncodable for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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