Struct ThinData

Source
#[repr(C)]
pub struct ThinData<Head, SliceItem> { pub head: Head, pub slice: [SliceItem], /* private fields */ }
Expand description

A custom slice-holding dynamically sized type. Stores slice length inline to be thin-pointer compatible.

§Stability

Note that even though this struct is #[repr(C)], the offsets of its public fields are not public. A private field appears before them, so their offset should be treated as being unknown.

Fields§

§head: Head

The sized portion of this DST.

§slice: [SliceItem]

The slice portion of this DST.

Trait Implementations§

Source§

impl<Head: Debug, SliceItem: Debug> Debug for ThinData<Head, SliceItem>

Source§

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

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

impl<'a, Head, SliceItem> From<&'a ThinData<Head, SliceItem>> for ThinRef<'a, Head, SliceItem>

Source§

fn from(this: &'a ThinData<Head, SliceItem>) -> ThinRef<'a, Head, SliceItem>

Converts to this type from the input type.
Source§

impl<'a, Head, SliceItem> From<&'a ThinData<Head, SliceItem>> for ThinRefMut<'a, Head, SliceItem>

Source§

fn from(this: &'a ThinData<Head, SliceItem>) -> ThinRefMut<'a, Head, SliceItem>

Converts to this type from the input type.
Source§

impl<Head, SliceItem> From<ThinBox<Head, SliceItem>> for Box<ThinData<Head, SliceItem>>

Source§

fn from(this: ThinBox<Head, SliceItem>) -> Self

Converts to this type from the input type.
Source§

impl<'a, Head, SliceItem> From<ThinRef<'a, Head, SliceItem>> for &'a ThinData<Head, SliceItem>

Source§

fn from(this: ThinRef<'a, Head, SliceItem>) -> Self

Converts to this type from the input type.
Source§

impl<'a, Head, SliceItem> From<ThinRefMut<'a, Head, SliceItem>> for &'a mut ThinData<Head, SliceItem>

Source§

fn from(this: ThinRefMut<'a, Head, SliceItem>) -> Self

Converts to this type from the input type.
Source§

impl<Head: Hash, SliceItem: Hash> Hash for ThinData<Head, SliceItem>

Source§

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

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

impl<'a, Head, SliceItem> PartialEq<&'a ThinData<Head, SliceItem>> for ThinRef<'a, Head, SliceItem>
where &'a ThinData<Head, SliceItem>: PartialEq,

Source§

fn eq(&self, other: &&'a ThinData<Head, SliceItem>) -> 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<'a, Head, SliceItem> PartialEq<&'a ThinData<Head, SliceItem>> for ThinRefMut<'a, Head, SliceItem>
where &'a ThinData<Head, SliceItem>: PartialEq,

Source§

fn eq(&self, other: &&'a ThinData<Head, SliceItem>) -> 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<SliceItem: PartialEq> PartialEq<[SliceItem]> for ThinData<(), SliceItem>

Source§

fn eq(&self, other: &[SliceItem]) -> 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<Head: PartialEq, SliceItem: PartialEq> PartialEq for ThinData<Head, SliceItem>

Source§

fn eq(&self, other: &ThinData<Head, SliceItem>) -> 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<Head: Eq, SliceItem: Eq> Eq for ThinData<Head, SliceItem>

Source§

impl<Head, SliceItem> StructuralPartialEq for ThinData<Head, SliceItem>

Auto Trait Implementations§

§

impl<Head, SliceItem> Freeze for ThinData<Head, SliceItem>
where Head: Freeze, SliceItem: Freeze,

§

impl<Head, SliceItem> RefUnwindSafe for ThinData<Head, SliceItem>
where Head: RefUnwindSafe, SliceItem: RefUnwindSafe,

§

impl<Head, SliceItem> Send for ThinData<Head, SliceItem>
where Head: Send, SliceItem: Send,

§

impl<Head, SliceItem> !Sized for ThinData<Head, SliceItem>

§

impl<Head, SliceItem> Sync for ThinData<Head, SliceItem>
where Head: Sync, SliceItem: Sync,

§

impl<Head, SliceItem> Unpin for ThinData<Head, SliceItem>
where Head: Unpin, SliceItem: Unpin,

§

impl<Head, SliceItem> UnwindSafe for ThinData<Head, SliceItem>
where Head: UnwindSafe, SliceItem: 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