pub enum VcardBinary<'a> {
Uri(Cow<'a, str>),
Base64(Cow<'a, str>),
}Expand description
A decoded binary value: an external URI reference, or inline base64 kept as its raw text.
Variants§
Uri(Cow<'a, str>)
An external URI reference.
Base64(Cow<'a, str>)
Inline base64 data, kept verbatim (not decoded to bytes).
Implementations§
Source§impl VcardBinary<'_>
impl VcardBinary<'_>
Sourcepub fn decode_base64(&self) -> Option<Result<Vec<u8>, DecodeError>>
Available on crate feature base64 only.
pub fn decode_base64(&self) -> Option<Result<Vec<u8>, DecodeError>>
base64 only.Trait Implementations§
Source§impl<'a> Clone for VcardBinary<'a>
impl<'a> Clone for VcardBinary<'a>
Source§fn clone(&self) -> VcardBinary<'a>
fn clone(&self) -> VcardBinary<'a>
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<'a> Debug for VcardBinary<'a>
impl<'a> Debug for VcardBinary<'a>
impl<'a> Eq for VcardBinary<'a>
Source§impl<'a> PartialEq for VcardBinary<'a>
impl<'a> PartialEq for VcardBinary<'a>
impl<'a> StructuralPartialEq for VcardBinary<'a>
Source§impl<'v> VcardCodec<'v> for VcardBinary<'v>
Available on crate feature parser only.
impl<'v> VcardCodec<'v> for VcardBinary<'v>
Available on crate feature
parser only.Source§fn decode(node: &'v VcardValueNode<'_>) -> Self
fn decode(node: &'v VcardValueNode<'_>) -> Self
Decode the value from a syntax node.
Source§fn encode(&self, escaper: VcardEscaper) -> VcardValueNode<'static>
fn encode(&self, escaper: VcardEscaper) -> VcardValueNode<'static>
Encode the value into a syntax node for the given escaping mode.
Auto Trait Implementations§
impl<'a> Freeze for VcardBinary<'a>
impl<'a> RefUnwindSafe for VcardBinary<'a>
impl<'a> Send for VcardBinary<'a>
impl<'a> Sync for VcardBinary<'a>
impl<'a> Unpin for VcardBinary<'a>
impl<'a> UnsafeUnpin for VcardBinary<'a>
impl<'a> UnwindSafe for VcardBinary<'a>
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