pub struct ByteStrView {
pub offset: u32,
pub len: u32,
}Expand description
Opaque handle into a ByteStringPool. Cheap to copy.
Two views are equal if and only if their (offset, len) are equal —
this does NOT compare bytes. Use ByteStringPool::get to fetch the
payload before doing a content comparison.
Fields§
§offset: u32§len: u32Implementations§
Trait Implementations§
Source§impl Clone for ByteStrView
impl Clone for ByteStrView
Source§fn clone(&self) -> ByteStrView
fn clone(&self) -> ByteStrView
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 ByteStrView
impl Debug for ByteStrView
Source§impl Hash for ByteStrView
impl Hash for ByteStrView
Source§impl Ord for ByteStrView
impl Ord for ByteStrView
Source§fn cmp(&self, other: &ByteStrView) -> Ordering
fn cmp(&self, other: &ByteStrView) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ByteStrView
impl PartialEq for ByteStrView
Source§fn eq(&self, other: &ByteStrView) -> bool
fn eq(&self, other: &ByteStrView) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ByteStrView
impl PartialOrd for ByteStrView
impl Copy for ByteStrView
impl Eq for ByteStrView
impl StructuralPartialEq for ByteStrView
Auto Trait Implementations§
impl Freeze for ByteStrView
impl RefUnwindSafe for ByteStrView
impl Send for ByteStrView
impl Sync for ByteStrView
impl Unpin for ByteStrView
impl UnsafeUnpin for ByteStrView
impl UnwindSafe for ByteStrView
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more