pub struct Inner<T>(/* private fields */);
Expand description
A simple container which stores a T
.
This container exists to allow us to store items on the stack, without needing to allocate with
something like Box<T>
. For all other intents and purposes, it acts as the T
which it
contains.
Implementations§
Trait Implementations§
Source§impl<T> Container<T> for Inner<T>where
T: Value,
impl<T> Container<T> for Inner<T>where
T: Value,
Source§fn into_inner(self) -> T
fn into_inner(self) -> T
All containers are capable of returning the value they wrap Read more
Source§impl<'de, T> Deserialize<'de> for Inner<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Inner<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T: Ord> Ord for Inner<T>
impl<T: Ord> Ord for Inner<T>
Source§impl<T: PartialOrd> PartialOrd for Inner<T>
impl<T: PartialOrd> PartialOrd for Inner<T>
impl<T: Eq> Eq for Inner<T>
impl<T> StructuralPartialEq for Inner<T>
Auto Trait Implementations§
impl<T> Freeze for Inner<T>where
T: Freeze,
impl<T> RefUnwindSafe for Inner<T>where
T: RefUnwindSafe,
impl<T> Send for Inner<T>where
T: Send,
impl<T> Sync for Inner<T>where
T: Sync,
impl<T> Unpin for Inner<T>where
T: Unpin,
impl<T> UnwindSafe for Inner<T>where
T: UnwindSafe,
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.