pub enum BytesOrStr<'a> {
Bytes(&'a [u8]),
Str(&'a str),
}Expand description
Bytes or Str. Being an str means the data is UTF-8 valid.
Variantsยง
Implementationsยง
Trait Implementationsยง
Sourceยงimpl<'a> Clone for BytesOrStr<'a>
impl<'a> Clone for BytesOrStr<'a>
Sourceยงfn clone(&self) -> BytesOrStr<'a>
fn clone(&self) -> BytesOrStr<'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 moreimpl<'a> Copy for BytesOrStr<'a>
Sourceยงimpl<'a> Debug for BytesOrStr<'a>
impl<'a> Debug for BytesOrStr<'a>
impl<'a> Eq for BytesOrStr<'a>
Sourceยงimpl<'a> Hash for BytesOrStr<'a>
impl<'a> Hash for BytesOrStr<'a>
Sourceยงimpl<'a> PartialEq for BytesOrStr<'a>
impl<'a> PartialEq for BytesOrStr<'a>
Sourceยงfn eq(&self, other: &BytesOrStr<'a>) -> bool
fn eq(&self, other: &BytesOrStr<'a>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<'a> StructuralPartialEq for BytesOrStr<'a>
Auto Trait Implementationsยง
impl<'a> Freeze for BytesOrStr<'a>
impl<'a> RefUnwindSafe for BytesOrStr<'a>
impl<'a> Send for BytesOrStr<'a>
impl<'a> Sync for BytesOrStr<'a>
impl<'a> Unpin for BytesOrStr<'a>
impl<'a> UnsafeUnpin for BytesOrStr<'a>
impl<'a> UnwindSafe for BytesOrStr<'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