[−][src]Struct slice_dst::StrWithHeader
A custom str-based DST.
The length is stored as a usize
at offset 0.
This must be the length of the trailing slice.
Fields
header: Header
The included header. Does not dictate the slice length.
str: str
The included str.
Implementations
impl<Header> StrWithHeader<Header>
[src]
pub fn new<A>(header: Header, s: &str) -> A where
A: AllocSliceDst<Self>,
[src]
A: AllocSliceDst<Self>,
Create a new str/header DST in a AllocSliceDst
container.
Trait Implementations
impl<Header: Debug> Debug for StrWithHeader<Header>
[src]
impl<Header: Eq> Eq for StrWithHeader<Header>
[src]
impl<Header> Erasable for StrWithHeader<Header>
[src]
unsafe fn unerase(this: ErasedPtr) -> NonNull<Self>
[src]
const ACK_1_1_0: bool
[src]
fn erase(this: NonNull<Self>) -> NonNull<Erased>
[src]
impl<Header: Hash> Hash for StrWithHeader<Header>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<Header: PartialEq> PartialEq<StrWithHeader<Header>> for StrWithHeader<Header>
[src]
fn eq(&self, other: &StrWithHeader<Header>) -> bool
[src]
fn ne(&self, other: &StrWithHeader<Header>) -> bool
[src]
impl<Header> SliceDst for StrWithHeader<Header>
[src]
impl<Header> StructuralEq for StrWithHeader<Header>
[src]
impl<Header> StructuralPartialEq for StrWithHeader<Header>
[src]
Auto Trait Implementations
impl<Header> Send for StrWithHeader<Header> where
Header: Send,
Header: Send,
impl<Header> Sync for StrWithHeader<Header> where
Header: Sync,
Header: Sync,
impl<Header> Unpin for StrWithHeader<Header> where
Header: Unpin,
Header: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Erasable for T
[src]
unsafe fn unerase(this: NonNull<Erased>) -> NonNull<T>
[src]
const ACK_1_1_0: bool
[src]
fn erase(this: NonNull<Self>) -> NonNull<Erased>
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,