pub struct EncryptedLeaf { /* private fields */ }Expand description
A parsed ENC[…] leaf: the three base64 fields plus the type tag.
Implementations§
Source§impl EncryptedLeaf
impl EncryptedLeaf
Sourcepub fn looks_encrypted(s: &str) -> bool
pub fn looks_encrypted(s: &str) -> bool
Whether a string even looks like an encrypted leaf.
Cheap prefix test, used to decide whether a scalar is ciphertext or a value that was left in the clear by a selector rule.
Sourcepub fn parse(s: &str) -> Result<Self, WireError>
pub fn parse(s: &str) -> Result<Self, WireError>
Parse the wire rendering.
Hand-split rather than regex-matched: the fields are positional and
delimiter-separated, and .split_once on each delimiter in order is both
faster and — more usefully — impossible to get subtly wrong the way a
greedy (.+) group can. Upstream’s regex is unanchored at the end, so
trailing bytes are ignored here too.
Trait Implementations§
Source§impl Clone for EncryptedLeaf
impl Clone for EncryptedLeaf
Source§fn clone(&self) -> EncryptedLeaf
fn clone(&self) -> EncryptedLeaf
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 EncryptedLeaf
impl Debug for EncryptedLeaf
impl Eq for EncryptedLeaf
Source§impl PartialEq for EncryptedLeaf
impl PartialEq for EncryptedLeaf
impl StructuralPartialEq for EncryptedLeaf
Auto Trait Implementations§
impl Freeze for EncryptedLeaf
impl RefUnwindSafe for EncryptedLeaf
impl Send for EncryptedLeaf
impl Sync for EncryptedLeaf
impl Unpin for EncryptedLeaf
impl UnsafeUnpin for EncryptedLeaf
impl UnwindSafe for EncryptedLeaf
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