pub enum DataItem<'a, P>where
P: ToOwned,{
Str(&'a str),
Bytes(&'a [u8]),
Parsed(Cow<'a, P>),
}Variants§
Str(&'a str)
Bytes(&'a [u8])
Parsed(Cow<'a, P>)
With parsed, we allow owned data since its likely compact and it may be necessary when we are unable to produce a reference to the primary-source data.
Auto Trait Implementations§
impl<'a, P> Freeze for DataItem<'a, P>
impl<'a, P> RefUnwindSafe for DataItem<'a, P>
impl<'a, P> Send for DataItem<'a, P>
impl<'a, P> Sync for DataItem<'a, P>
impl<'a, P> Unpin for DataItem<'a, P>
impl<'a, P> UnwindSafe for DataItem<'a, P>
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