HeaderSliceWithLengthProtected

Struct HeaderSliceWithLengthProtected 

Source
pub struct HeaderSliceWithLengthProtected<H, T> { /* private fields */ }
Expand description

A type wrapping HeaderSlice<HeaderWithLength<H>, T> that is used internally in ThinArc.

§Safety

Safety-usable invariants:

  • This is guaranteed to have the same representation as HeaderSlice<HeaderWithLength<H>, [T]>
  • The header length (.length()) is checked to be the slice length

Implementations§

Source§

impl<H, T> HeaderSliceWithLengthProtected<H, T>

Source

pub fn header(&self) -> &H

Source

pub fn header_mut(&mut self) -> &mut H

Source

pub fn length(&self) -> usize

Source

pub fn slice(&self) -> &[T]

Source

pub fn slice_mut(&mut self) -> &mut [T]

Trait Implementations§

Source§

impl<H: Debug, T: Debug> Debug for HeaderSliceWithLengthProtected<H, T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<H: Hash, T: Hash> Hash for HeaderSliceWithLengthProtected<H, T>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
Source§

impl<H: Ord, T: Ord> Ord for HeaderSliceWithLengthProtected<H, T>

Source§

fn cmp(&self, other: &HeaderSliceWithLengthProtected<H, T>) -> Ordering

This method returns an Ordering between self and other. Read more
Source§

impl<H: PartialEq, T: PartialEq> PartialEq for HeaderSliceWithLengthProtected<H, T>

Source§

fn eq(&self, other: &HeaderSliceWithLengthProtected<H, T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<H: PartialOrd, T: PartialOrd> PartialOrd for HeaderSliceWithLengthProtected<H, T>

Source§

fn partial_cmp( &self, other: &HeaderSliceWithLengthProtected<H, T>, ) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<H: Eq, T: Eq> Eq for HeaderSliceWithLengthProtected<H, T>

Source§

impl<H, T> StructuralPartialEq for HeaderSliceWithLengthProtected<H, T>

Auto Trait Implementations§

§

impl<H, T> Freeze for HeaderSliceWithLengthProtected<H, T>
where H: Freeze, T: Freeze,

§

impl<H, T> RefUnwindSafe for HeaderSliceWithLengthProtected<H, T>

§

impl<H, T> Send for HeaderSliceWithLengthProtected<H, T>
where H: Send, T: Send,

§

impl<H, T> !Sized for HeaderSliceWithLengthProtected<H, T>

§

impl<H, T> Sync for HeaderSliceWithLengthProtected<H, T>
where H: Sync, T: Sync,

§

impl<H, T> Unpin for HeaderSliceWithLengthProtected<H, T>
where H: Unpin, T: Unpin,

§

impl<H, T> UnwindSafe for HeaderSliceWithLengthProtected<H, T>
where H: UnwindSafe, T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more