pub struct NonEmptyStack<T> { /* private fields */ }Expand description
A stack that ALWAYS have at least one element.
Implementations§
Source§impl<T> NonEmptyStack<T>
A stack that always have at least one element,
where the last element can be frequently accessed
impl<T> NonEmptyStack<T>
A stack that always have at least one element, where the last element can be frequently accessed
pub const fn new(value: T) -> NonEmptyStack<T>
pub fn with_capacity(value: T, capacity: usize) -> NonEmptyStack<T>
pub fn from_vec(stack: Vec<T>) -> Option<NonEmptyStack<T>>
pub fn len(&self) -> usize
pub const fn last(&self) -> &T
pub const fn last_mut(&mut self) -> &mut T
Sourcepub fn clear_and_keep_last(&mut self)
pub fn clear_and_keep_last(&mut self)
Clear the stack and keep the last element
use hexga_utils::prelude::*;
let mut stack = NonEmptyStack::from_vec(vec![1,2,3,4]).unwrap();
stack.clear_and_keep_last();
assert_eq!(stack.len(), 1);
assert_eq!(stack.last(), &4);Sourcepub fn clear_and_keep_first(&mut self)
pub fn clear_and_keep_first(&mut self)
Clear the stack and keep the first element
use hexga_utils::prelude::*;
let mut stack = NonEmptyStack::from_vec(vec![1,2,3,4]).unwrap();
stack.clear_and_keep_first();
assert_eq!(stack.len(), 1);
assert_eq!(stack.last(), &1);Sourcepub fn clear_and_keep(&mut self, value: T)
pub fn clear_and_keep(&mut self, value: T)
Clear the stack and keep passed value
pub fn push(&mut self, value: T)
Sourcepub fn duplicate(&mut self) -> &mut NonEmptyStack<T>where
T: Clone,
pub fn duplicate(&mut self) -> &mut NonEmptyStack<T>where
T: Clone,
Clone the last element and push it
pub fn pop(&mut self) -> Option<T>
pub fn iter(&self) -> NonEmptyStackIter<'_, T> ⓘ
pub fn iter_mut(&mut self) -> NonEmptyStackIterMut<'_, T> ⓘ
pub fn into_values(self) -> Vec<T>
Trait Implementations§
Source§impl<T> Clone for NonEmptyStack<T>where
T: Clone,
impl<T> Clone for NonEmptyStack<T>where
T: Clone,
Source§fn clone(&self) -> NonEmptyStack<T>
fn clone(&self) -> NonEmptyStack<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T> Debug for NonEmptyStack<T>where
T: Debug,
impl<T> Debug for NonEmptyStack<T>where
T: Debug,
Source§impl<T> Default for NonEmptyStack<T>where
T: Default,
impl<T> Default for NonEmptyStack<T>where
T: Default,
Source§fn default() -> NonEmptyStack<T>
fn default() -> NonEmptyStack<T>
Returns the “default value” for a type. Read more
Source§impl<T> Deref for NonEmptyStack<T>
impl<T> Deref for NonEmptyStack<T>
Source§impl<T> DerefMut for NonEmptyStack<T>
impl<T> DerefMut for NonEmptyStack<T>
Source§impl<'de, T> Deserialize<'de> for NonEmptyStack<T>where
T: Deserialize<'de>,
Available on crate feature serde only.
impl<'de, T> Deserialize<'de> for NonEmptyStack<T>where
T: Deserialize<'de>,
Available on crate feature
serde only.Source§fn deserialize<D>(
deserializer: D,
) -> Result<NonEmptyStack<T>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<NonEmptyStack<T>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T> Get<usize> for NonEmptyStack<T>
impl<T> Get<usize> for NonEmptyStack<T>
type Output = T
Source§fn get(&self, index: usize) -> Option<&<NonEmptyStack<T> as Get<usize>>::Output>
fn get(&self, index: usize) -> Option<&<NonEmptyStack<T> as Get<usize>>::Output>
Returns a reference to the value.
Source§unsafe fn get_unchecked(
&self,
index: usize,
) -> &<NonEmptyStack<T> as Get<usize>>::Output
unsafe fn get_unchecked( &self, index: usize, ) -> &<NonEmptyStack<T> as Get<usize>>::Output
Returns a reference to the value.
Source§fn get_or_panic(&self, index: Idx) -> &Self::Output
fn get_or_panic(&self, index: Idx) -> &Self::Output
Returns a reference to the value.
Source§fn is_index_valid(&self, index: Idx) -> bool
fn is_index_valid(&self, index: Idx) -> bool
True if
get(index) return Some, false otherwise.Source§fn is_index_invalid(&self, index: Idx) -> bool
fn is_index_invalid(&self, index: Idx) -> bool
True if
get(index) return None, false otherwise.fn contains(&self, index: Idx) -> bool
Source§impl<T> GetManyMut<usize> for NonEmptyStack<T>
impl<T> GetManyMut<usize> for NonEmptyStack<T>
fn try_get_many_mut<const N: usize>( &mut self, indices: [usize; N], ) -> Result<[&mut <NonEmptyStack<T> as Get<usize>>::Output; N], GetDisjointMutError>
Source§fn get_many_mut<const N: usize>(
&mut self,
indices: [Idx; N],
) -> Option<[&mut Self::Output; N]>
fn get_many_mut<const N: usize>( &mut self, indices: [Idx; N], ) -> Option<[&mut Self::Output; N]>
Returns multiples mutables references to the values.
All values that can be accessed with the indices must be disjoint.
Source§fn get_many_mut_or_panic<const N: usize>(
&mut self,
indices: [Idx; N],
) -> [&mut Self::Output; N]
fn get_many_mut_or_panic<const N: usize>( &mut self, indices: [Idx; N], ) -> [&mut Self::Output; N]
Returns multiples mutables references to the values.
All values that can be accessed with the indices must be disjoint.
Source§unsafe fn get_many_unchecked_mut<const N: usize>(
&mut self,
indices: [Idx; N],
) -> [&mut Self::Output; N]
unsafe fn get_many_unchecked_mut<const N: usize>( &mut self, indices: [Idx; N], ) -> [&mut Self::Output; N]
Returns multiples mutables references to the values.
All values that can be accessed with the indices must be disjoint.
Source§fn swap(&mut self, a: Idx, b: Idx) -> bool
fn swap(&mut self, a: Idx, b: Idx) -> bool
Swaps the values at two mutable locations, without deinitializing either one. Read more
Source§fn swap_or_panic(&mut self, a: Idx, b: Idx)
fn swap_or_panic(&mut self, a: Idx, b: Idx)
Swaps the values at two mutable locations, without deinitializing either one. Read more
Source§impl<T> GetMut<usize> for NonEmptyStack<T>
impl<T> GetMut<usize> for NonEmptyStack<T>
Source§fn get_mut(
&mut self,
index: usize,
) -> Option<&mut <NonEmptyStack<T> as Get<usize>>::Output>
fn get_mut( &mut self, index: usize, ) -> Option<&mut <NonEmptyStack<T> as Get<usize>>::Output>
Returns a mutable reference to the value.
Source§unsafe fn get_unchecked_mut(
&mut self,
index: usize,
) -> &mut <NonEmptyStack<T> as Get<usize>>::Output
unsafe fn get_unchecked_mut( &mut self, index: usize, ) -> &mut <NonEmptyStack<T> as Get<usize>>::Output
Returns a mutable reference to the value.
fn get_mut_or_panic(&mut self, index: Idx) -> &mut Self::Output
Source§fn replace(&mut self, index: Idx, value: Self::Output) -> Option<Self::Output>
fn replace(&mut self, index: Idx, value: Self::Output) -> Option<Self::Output>
Replace the value and return the old one. Read more
Source§fn replace_or_panic(&mut self, index: Idx, value: Self::Output) -> Self::Output
fn replace_or_panic(&mut self, index: Idx, value: Self::Output) -> Self::Output
Replace the value and return the old one. Read more
Source§unsafe fn replace_unchecked(
&mut self,
index: Idx,
value: Self::Output,
) -> Self::Output
unsafe fn replace_unchecked( &mut self, index: Idx, value: Self::Output, ) -> Self::Output
Replace the value and return the old one. Read more
Source§fn set(&mut self, index: Idx, value: Self::Output) -> bool
fn set(&mut self, index: Idx, value: Self::Output) -> bool
Set the value and drop the previous one.
Source§fn set_or_panic(&mut self, index: Idx, value: Self::Output) -> &mut Self
fn set_or_panic(&mut self, index: Idx, value: Self::Output) -> &mut Self
Set the value and drop the previous one.
unsafe fn set_unchecked(&mut self, index: Idx, value: Self::Output) -> &mut Self
Source§impl<T> Hash for NonEmptyStack<T>where
T: Hash,
impl<T> Hash for NonEmptyStack<T>where
T: Hash,
Source§impl<T> Index<usize> for NonEmptyStack<T>
impl<T> Index<usize> for NonEmptyStack<T>
Source§impl<T> IndexMut<usize> for NonEmptyStack<T>
impl<T> IndexMut<usize> for NonEmptyStack<T>
Source§impl<'a, T> IntoIterator for &'a NonEmptyStack<T>
impl<'a, T> IntoIterator for &'a NonEmptyStack<T>
Source§type IntoIter = NonEmptyStackIter<'a, T>
type IntoIter = NonEmptyStackIter<'a, T>
Which kind of iterator are we turning this into?
Source§fn into_iter(self) -> <&'a NonEmptyStack<T> as IntoIterator>::IntoIter
fn into_iter(self) -> <&'a NonEmptyStack<T> as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
Source§impl<'a, T> IntoIterator for &'a mut NonEmptyStack<T>
impl<'a, T> IntoIterator for &'a mut NonEmptyStack<T>
Source§type IntoIter = NonEmptyStackIterMut<'a, T>
type IntoIter = NonEmptyStackIterMut<'a, T>
Which kind of iterator are we turning this into?
Source§fn into_iter(self) -> <&'a mut NonEmptyStack<T> as IntoIterator>::IntoIter
fn into_iter(self) -> <&'a mut NonEmptyStack<T> as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
Source§impl<T> IntoIterator for NonEmptyStack<T>
impl<T> IntoIterator for NonEmptyStack<T>
Source§type IntoIter = NonEmptyStackIntoIter<T>
type IntoIter = NonEmptyStackIntoIter<T>
Which kind of iterator are we turning this into?
Source§fn into_iter(self) -> <NonEmptyStack<T> as IntoIterator>::IntoIter
fn into_iter(self) -> <NonEmptyStack<T> as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
Source§impl<T> Length for NonEmptyStack<T>
impl<T> Length for NonEmptyStack<T>
Source§impl<T> Ord for NonEmptyStack<T>where
T: Ord,
impl<T> Ord for NonEmptyStack<T>where
T: Ord,
Source§fn cmp(&self, other: &NonEmptyStack<T>) -> Ordering
fn cmp(&self, other: &NonEmptyStack<T>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T> PartialEq for NonEmptyStack<T>where
T: PartialEq,
impl<T> PartialEq for NonEmptyStack<T>where
T: PartialEq,
Source§impl<T> PartialOrd for NonEmptyStack<T>where
T: PartialOrd,
impl<T> PartialOrd for NonEmptyStack<T>where
T: PartialOrd,
Source§impl<T> Reserve for NonEmptyStack<T>
impl<T> Reserve for NonEmptyStack<T>
fn reserve(&mut self, additional: usize)
fn reserve_exact(&mut self, additional: usize)
fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>
fn try_reserve_exact( &mut self, additional: usize, ) -> Result<(), TryReserveError>
Source§fn reserve_total(&mut self, total: usize)where
Self: Length,
fn reserve_total(&mut self, total: usize)where
Self: Length,
Ensure total capacity is at least
total.
Does nothing if the current capacity is already >= total.Source§fn try_reserve_total(&mut self, total: usize) -> Result<(), TryReserveError>where
Self: Length,
fn try_reserve_total(&mut self, total: usize) -> Result<(), TryReserveError>where
Self: Length,
Ensure total capacity is at least
total.
Does nothing if the current capacity is already >= total.Source§fn reserve_total_exact(&mut self, total: usize)where
Self: Length,
fn reserve_total_exact(&mut self, total: usize)where
Self: Length,
Ensure total capacity is at least
total.
Does nothing if the current capacity is already >= total.Source§fn try_reserve_total_exact(
&mut self,
total: usize,
) -> Result<(), TryReserveError>where
Self: Length,
fn try_reserve_total_exact(
&mut self,
total: usize,
) -> Result<(), TryReserveError>where
Self: Length,
Ensure total capacity is at least
total.
Does nothing if the current capacity is already >= total.Source§impl<T> Serialize for NonEmptyStack<T>where
T: Serialize,
Available on crate feature serde only.
impl<T> Serialize for NonEmptyStack<T>where
T: Serialize,
Available on crate feature
serde only.Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl<T> Shrink for NonEmptyStack<T>
impl<T> Shrink for NonEmptyStack<T>
Source§fn shrink_to_fit(&mut self)
fn shrink_to_fit(&mut self)
Shrinks the capacity as much as possible.
Source§impl<T> Truncate for NonEmptyStack<T>
impl<T> Truncate for NonEmptyStack<T>
Source§impl<T> TryFrom<Vec<T>> for NonEmptyStack<T>
impl<T> TryFrom<Vec<T>> for NonEmptyStack<T>
Source§impl<T> WithCapacity for NonEmptyStack<T>
impl<T> WithCapacity for NonEmptyStack<T>
type Param = T
fn with_capacity_and_param( capacity: usize, value: <NonEmptyStack<T> as WithCapacity>::Param, ) -> NonEmptyStack<T>
fn with_capacity(capacity: usize) -> Self
impl<T> Collection for NonEmptyStack<T>
impl<T> CollectionBijective for NonEmptyStack<T>
impl<T> Eq for NonEmptyStack<T>where
T: Eq,
impl<T> StructuralPartialEq for NonEmptyStack<T>
Auto Trait Implementations§
impl<T> Freeze for NonEmptyStack<T>where
T: Freeze,
impl<T> RefUnwindSafe for NonEmptyStack<T>where
T: RefUnwindSafe,
impl<T> Send for NonEmptyStack<T>where
T: Send,
impl<T> Sync for NonEmptyStack<T>where
T: Sync,
impl<T> Unpin for NonEmptyStack<T>where
T: Unpin,
impl<T> UnsafeUnpin for NonEmptyStack<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for NonEmptyStack<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<S, T> CastRangeInto<T> for Swhere
T: CastRangeFrom<S>,
impl<S, T> CastRangeInto<T> for Swhere
T: CastRangeFrom<S>,
fn cast_range_into(self) -> T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<I, T> CollectTo<T> for Iwhere
I: IntoIterator<Item = T>,
impl<I, T> CollectTo<T> for Iwhere
I: IntoIterator<Item = T>,
fn to_vec(self) -> Vec<T>
fn to_linkedlist(self) -> LinkedList<T>
fn to_vecdeque(self) -> VecDeque<T>
fn to_hashset(self) -> HashSet<T>
fn to_btreeset(self) -> BTreeSet<T>where
T: Ord,
Source§impl<I, K, V, S> CollectToGenMap<K, V, S> for I
impl<I, K, V, S> CollectToGenMap<K, V, S> for I
Source§impl<I, K, S> CollectToGenSet<K, S> for Iwhere
I: IntoIterator<Item = K>,
K: Clone,
impl<I, K, S> CollectToGenSet<K, S> for Iwhere
I: IntoIterator<Item = K>,
K: Clone,
Source§impl<I, T> CollectToGenVec<T> for Iwhere
I: IntoIterator<Item = T>,
impl<I, T> CollectToGenVec<T> for Iwhere
I: IntoIterator<Item = T>,
Source§impl<I, T1, T2> CollectToMap<T1, T2> for Iwhere
I: IntoIterator<Item = (T1, T2)>,
impl<I, T1, T2> CollectToMap<T1, T2> for Iwhere
I: IntoIterator<Item = (T1, T2)>,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<T> DefaultExtension for T
impl<T> DefaultExtension for T
fn is_default(&self) -> bool
fn is_not_default(&self) -> bool
Source§impl<T> DefaultIsTripleUnderscore for Twhere
T: Default,
impl<T> DefaultIsTripleUnderscore for Twhere
T: Default,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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§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.Source§impl<T> FromJson for Twhere
T: for<'de> Deserialize<'de>,
impl<T> FromJson for Twhere
T: for<'de> Deserialize<'de>,
fn from_json_bytes(bytes: &[u8]) -> Result<Self, EncodeError>
fn from_json_with_reader<R>(reader: R) -> Result<Self, EncodeError>where
R: Read,
fn from_json(json: &str) -> Result<Self, EncodeError>
Source§impl<T> FromRon for Twhere
T: for<'de> Deserialize<'de>,
impl<T> FromRon for Twhere
T: for<'de> Deserialize<'de>,
fn from_ron_bytes(bytes: &[u8]) -> Result<Self, EncodeError>
fn from_ron_with_reader<R>(reader: R) -> Result<Self, EncodeError>where
R: Read,
fn from_ron(ron: &str) -> Result<Self, EncodeError>
Source§impl<T> FromTmpBin for Twhere
T: for<'de> Deserialize<'de>,
impl<T> FromTmpBin for Twhere
T: for<'de> Deserialize<'de>,
fn from_tmp_bin_bytes(bytes: &[u8]) -> Result<Self, EncodeError>
fn from_tmp_bin_with_reader<R>(reader: R) -> Result<Self, EncodeError>where
R: Read,
Source§impl<T> FromXml for Twhere
T: for<'de> Deserialize<'de>,
impl<T> FromXml for Twhere
T: for<'de> Deserialize<'de>,
fn from_xml_bytes(bytes: &[u8]) -> Result<Self, EncodeError>
fn from_xml_with_reader<R>(reader: R) -> Result<Self, EncodeError>where
R: Read,
fn from_xml(xml: &str) -> Result<Self, EncodeError>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<'a, Item, T> IterExtension<'a, Item> for Twhere
&'a T: IntoIterator<Item = Item> + 'a,
impl<'a, Item, T> IterExtension<'a, Item> for Twhere
&'a T: IntoIterator<Item = Item> + 'a,
fn iter(&'a self) -> <&'a Self as IntoIterator>::IntoIter
Source§impl<Item, T> IterPredicate<Item> for Twhere
T: IntoIterator<Item = Item>,
impl<Item, T> IterPredicate<Item> for Twhere
T: IntoIterator<Item = Item>,
Source§impl<T, Z> MinusOneIter for T
impl<T, Z> MinusOneIter for T
fn all_minusone(&self) -> bool
fn any_minusone(&self) -> bool
Source§impl<T> PartialOrdExtension for Twhere
T: PartialOrd,
impl<T> PartialOrdExtension for Twhere
T: PartialOrd,
Source§fn max_partial(self, other: Self) -> Selfwhere
Self: Sized,
fn max_partial(self, other: Self) -> Selfwhere
Self: Sized,
Using
PartialOrd operator, not component wiseSource§fn min_partial(self, other: Self) -> Selfwhere
Self: Sized,
fn min_partial(self, other: Self) -> Selfwhere
Self: Sized,
Using
PartialOrd operator, not component wiseSource§fn clamp_partial(self, min: Self, max: Self) -> Selfwhere
Self: Sized,
fn clamp_partial(self, min: Self, max: Self) -> Selfwhere
Self: Sized,
Using
PartialOrd operator, not component wiseSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ToJson for Twhere
T: Serialize,
impl<T> ToJson for Twhere
T: Serialize,
fn to_json(&self) -> Result<String, EncodeError>
fn to_json_with_writer<W>(&self, writer: W) -> Result<(), EncodeError>where
W: Write,
Source§impl<T> ToRon for Twhere
T: Serialize,
impl<T> ToRon for Twhere
T: Serialize,
fn to_ron(&self) -> Result<String, EncodeError>
fn to_ron_with_writer<W>(&self, writer: W) -> Result<(), EncodeError>where
W: Write,
Source§impl<T> ToTmpBin for Twhere
T: Serialize,
impl<T> ToTmpBin for Twhere
T: Serialize,
Source§fn to_tmp_bin(&self) -> Result<Vec<u8>, EncodeError>
fn to_tmp_bin(&self) -> Result<Vec<u8>, EncodeError>
Intended for short-term storage of data in a binary format, such as during data transfer. Read more
Source§fn to_tmp_bin_with_writer<W>(&self, writer: W) -> Result<(), EncodeError>where
W: Write,
fn to_tmp_bin_with_writer<W>(&self, writer: W) -> Result<(), EncodeError>where
W: Write,
Intended for short-term storage of data in a binary format, such as during data transfer. Read more