pub struct IcalValueLeaf<'a>(pub Cow<'a, [u8]>);Available on crate feature
parser only.Expand description
A single raw value component of a calendar, held as raw bytes so a foreign charset survives byte for byte. Borrowed when parsed, owned when built or edited. The codec resolves these bytes to the decoded model’s UTF-8 text (lossily, when they are not UTF-8); the raw bytes stay reachable here.
Tuple Fields§
§0: Cow<'a, [u8]>Implementations§
Source§impl<'a> IcalValueLeaf<'a>
impl<'a> IcalValueLeaf<'a>
Sourcepub fn to_str_lossy(&self) -> Cow<'_, str>
pub fn to_str_lossy(&self) -> Cow<'_, str>
The raw bytes as UTF-8 text, lossily (invalid sequences become the
replacement character). For a diagnostic or a best-effort read; the
exact bytes are as_bytes.
Trait Implementations§
Source§impl<'a> Clone for IcalValueLeaf<'a>
impl<'a> Clone for IcalValueLeaf<'a>
Source§fn clone(&self) -> IcalValueLeaf<'a>
fn clone(&self) -> IcalValueLeaf<'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 IcalValueLeaf<'a>
impl<'a> Debug for IcalValueLeaf<'a>
Source§impl<'a> From<&'a [u8]> for IcalValueLeaf<'a>
impl<'a> From<&'a [u8]> for IcalValueLeaf<'a>
Auto Trait Implementations§
impl<'a> Freeze for IcalValueLeaf<'a>
impl<'a> RefUnwindSafe for IcalValueLeaf<'a>
impl<'a> Send for IcalValueLeaf<'a>
impl<'a> Sync for IcalValueLeaf<'a>
impl<'a> Unpin for IcalValueLeaf<'a>
impl<'a> UnsafeUnpin for IcalValueLeaf<'a>
impl<'a> UnwindSafe for IcalValueLeaf<'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