pub enum DigestPattern {
Any,
Digest(Digest),
Prefix(Vec<u8>),
BinaryRegex(Regex),
}
Expand description
Pattern for matching dCBOR digest values (CBOR tag 40001).
Variants§
Any
Matches any digest value.
Digest(Digest)
Matches the exact digest.
Prefix(Vec<u8>)
Matches the prefix of a digest (case insensitive).
BinaryRegex(Regex)
Matches the binary regular expression for a digest.
Implementations§
Source§impl DigestPattern
impl DigestPattern
Sourcepub fn digest(digest: Digest) -> Self
pub fn digest(digest: Digest) -> Self
Creates a new DigestPattern
that matches the exact digest.
Sourcepub fn prefix(prefix: impl AsRef<[u8]>) -> Self
pub fn prefix(prefix: impl AsRef<[u8]>) -> Self
Creates a new DigestPattern
that matches the prefix of a digest.
Sourcepub fn binary_regex(regex: Regex) -> Self
pub fn binary_regex(regex: Regex) -> Self
Creates a new DigestPattern
that matches the binary regex for a
digest.
Trait Implementations§
Source§impl Clone for DigestPattern
impl Clone for DigestPattern
Source§fn clone(&self) -> DigestPattern
fn clone(&self) -> DigestPattern
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 DigestPattern
impl Debug for DigestPattern
Source§impl Display for DigestPattern
impl Display for DigestPattern
Source§impl Hash for DigestPattern
impl Hash for DigestPattern
Source§impl PartialEq for DigestPattern
impl PartialEq for DigestPattern
impl Eq for DigestPattern
Auto Trait Implementations§
impl Freeze for DigestPattern
impl RefUnwindSafe for DigestPattern
impl Send for DigestPattern
impl Sync for DigestPattern
impl Unpin for DigestPattern
impl UnwindSafe for DigestPattern
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