Struct HeaderSlice

Source
#[repr(C)]
pub struct HeaderSlice<H, T> { pub head: H, pub body: [T], }

Fields§

§head: H§body: [T]

Implementations§

Source§

impl<H, T> HeaderSlice<H, T>

Source

pub fn as_truncated(&self, len: usize) -> &Self

Source

pub fn as_truncated_mut(&mut self, len: usize) -> &mut Self

Source

pub unsafe fn resized_unchecked(&mut self, len: usize) -> &mut Self

Source

pub fn len(&self) -> usize

Source

pub fn layout_for_len(len: usize) -> Layout

Returns the memory layout for an instance with the given length

Trait Implementations§

Source§

impl<H, T> AsMut<HeaderSlice<H, T>> for HeaderVec<H, T>

Source§

fn as_mut(&mut self) -> &mut HeaderSlice<H, T>

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl<H, T> AsRef<HeaderSlice<H, T>> for HeaderVec<H, T>

Source§

fn as_ref(&self) -> &HeaderSlice<H, T>

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<H, T> Borrow<HeaderSlice<H, T>> for HeaderVec<H, T>

Source§

fn borrow(&self) -> &HeaderSlice<H, T>

Immutably borrows from an owned value. Read more
Source§

impl<H, T> BorrowMut<HeaderSlice<H, T>> for HeaderVec<H, T>

Source§

fn borrow_mut(&mut self) -> &mut HeaderSlice<H, T>

Mutably borrows from an owned value. Read more
Source§

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

Source§

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

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

impl<H, T> From<HeaderVec<H, T>> for Box<HeaderSlice<H, T>>

Source§

fn from(src: HeaderVec<H, T>) -> Self

Converts to this type from the input type.
Source§

impl<H: Hash, T: Hash> Hash for HeaderSlice<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 HeaderSlice<H, T>

Source§

fn cmp(&self, rhs: &Self) -> Ordering

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

impl<H, T, Rhs> PartialEq<Rhs> for HeaderSlice<H, T>
where H: PartialEq, T: PartialEq, Rhs: Borrow<HeaderSlice<H, T>> + ?Sized,

Source§

fn eq(&self, rhs: &Rhs) -> 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, T, Rhs> PartialOrd<Rhs> for HeaderSlice<H, T>
where H: PartialOrd, T: PartialOrd, Rhs: Borrow<HeaderSlice<H, T>> + ?Sized,

Source§

fn partial_cmp(&self, rhs: &Rhs) -> 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: Clone, T: Clone> ToOwned for HeaderSlice<H, T>

Source§

type Owned = HeaderVec<H, T>

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> Self::Owned

Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · Source§

fn clone_into(&self, target: &mut Self::Owned)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

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

§

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

§

impl<H, T> UnwindSafe for HeaderSlice<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