Struct DefaultCollate

Source
pub struct DefaultCollate;
Expand description

Default Collate function that mimic the default_collate function from PyTorch.

As they are no such lib with the same functionality as PyTorch tensor in Rust, data is collated inside ndarray. Ndarray is the rust equivalent of numpy.ndarray with almost the same capabilities. Nevertheless, they can’t run on the GPU.

Basic transformation implemented for the default Collate :

  • Vec<Scalar> -> ndarray<scalar>
  • Vec<tuple> -> tuple(ndarray)
  • Vec<HashMap<Key, Value>> -> HasMap<Key, DefaultCollate::default().collate(Vec<Value>)
  • Vec<Array> -> Vec<Stack Array>
  • Vec[V1_i, V2_i, ...] -> Vec[DefaultCollate::default().collate([V1_1, V1_2, ...]), DefaultCollate::default().collate([V2_1, V2_2, ...]), ...]

Like for PyTorch version, String and u8 aren’t changed by the collation (No Op).

  • Vec<String> -> Vec<String>
  • Vec<&str> -> Vec<&str>
  • Vec<u8> -> Vec<u8>

Trait Implementations§

Source§

impl Clone for DefaultCollate

Source§

fn clone(&self) -> DefaultCollate

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Collate<&'a CStr> for DefaultCollate

Source§

type Output = Vec<&'a CStr>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<&'a CStr>) -> Self::Output

Take a batch of samples and collate them
Source§

impl<T> Collate<&T> for DefaultCollate
where T: Clone, Self: Collate<T>,

We think it makes no sense to but a bench of reference into a Tensor. That’s why if the dataset yield reference a we clone them them. It is useful for having a non-consuming Iterator over the Dataloader.

Source§

type Output = <DefaultCollate as Collate<T>>::Output

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<&T>) -> Self::Output

Take a batch of samples and collate them
Source§

impl<'a> Collate<&'a str> for DefaultCollate

Source§

type Output = Vec<&'a str>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<&'a str>) -> Self::Output

Take a batch of samples and collate them
Source§

impl<T, const N: usize> Collate<[T; N]> for DefaultCollate
where Self: Collate<T>, T: Clone,

Source§

type Output = Vec<<DefaultCollate as Collate<T>>::Output>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<[T; N]>) -> Self::Output

Take a batch of samples and collate them
Source§

impl<A> Collate<(A,)> for DefaultCollate

Source§

type Output = (<DefaultCollate as Collate<A>>::Output,)

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<(A,)>) -> Self::Output

Take a batch of samples and collate them
Source§

impl<A, B> Collate<(A, B)> for DefaultCollate
where A: Clone, B: Clone, DefaultCollate: Collate<A> + Collate<B>,

Source§

type Output = (<DefaultCollate as Collate<A>>::Output, <DefaultCollate as Collate<B>>::Output)

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<(A, B)>) -> Self::Output

Take a batch of samples and collate them
Source§

impl<A, B, C> Collate<(A, B, C)> for DefaultCollate
where A: Clone, B: Clone, C: Clone, DefaultCollate: Collate<A> + Collate<B> + Collate<C>,

Source§

type Output = (<DefaultCollate as Collate<A>>::Output, <DefaultCollate as Collate<B>>::Output, <DefaultCollate as Collate<C>>::Output)

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<(A, B, C)>) -> Self::Output

Take a batch of samples and collate them
Source§

impl<A, B, C, D> Collate<(A, B, C, D)> for DefaultCollate
where A: Clone, B: Clone, C: Clone, D: Clone, DefaultCollate: Collate<A> + Collate<B> + Collate<C> + Collate<D>,

Source§

type Output = (<DefaultCollate as Collate<A>>::Output, <DefaultCollate as Collate<B>>::Output, <DefaultCollate as Collate<C>>::Output, <DefaultCollate as Collate<D>>::Output)

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<(A, B, C, D)>) -> Self::Output

Take a batch of samples and collate them
Source§

impl<A, B, C, D, E> Collate<(A, B, C, D, E)> for DefaultCollate
where A: Clone, B: Clone, C: Clone, D: Clone, E: Clone, DefaultCollate: Collate<A> + Collate<B> + Collate<C> + Collate<D> + Collate<E>,

Source§

type Output = (<DefaultCollate as Collate<A>>::Output, <DefaultCollate as Collate<B>>::Output, <DefaultCollate as Collate<C>>::Output, <DefaultCollate as Collate<D>>::Output, <DefaultCollate as Collate<E>>::Output)

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<(A, B, C, D, E)>) -> Self::Output

Take a batch of samples and collate them
Source§

impl<A, B, C, D, E, F> Collate<(A, B, C, D, E, F)> for DefaultCollate
where A: Clone, B: Clone, C: Clone, D: Clone, E: Clone, F: Clone, DefaultCollate: Collate<A> + Collate<B> + Collate<C> + Collate<D> + Collate<E> + Collate<F>,

Source§

type Output = (<DefaultCollate as Collate<A>>::Output, <DefaultCollate as Collate<B>>::Output, <DefaultCollate as Collate<C>>::Output, <DefaultCollate as Collate<D>>::Output, <DefaultCollate as Collate<E>>::Output, <DefaultCollate as Collate<F>>::Output)

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<(A, B, C, D, E, F)>) -> Self::Output

Take a batch of samples and collate them
Source§

impl<A, B, C, D, E, F, G> Collate<(A, B, C, D, E, F, G)> for DefaultCollate
where A: Clone, B: Clone, C: Clone, D: Clone, E: Clone, F: Clone, G: Clone, DefaultCollate: Collate<A> + Collate<B> + Collate<C> + Collate<D> + Collate<E> + Collate<F> + Collate<G>,

Source§

type Output = (<DefaultCollate as Collate<A>>::Output, <DefaultCollate as Collate<B>>::Output, <DefaultCollate as Collate<C>>::Output, <DefaultCollate as Collate<D>>::Output, <DefaultCollate as Collate<E>>::Output, <DefaultCollate as Collate<F>>::Output, <DefaultCollate as Collate<G>>::Output)

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<(A, B, C, D, E, F, G)>) -> Self::Output

Take a batch of samples and collate them
Source§

impl<A, B, C, D, E, F, G, H> Collate<(A, B, C, D, E, F, G, H)> for DefaultCollate
where A: Clone, B: Clone, C: Clone, D: Clone, E: Clone, F: Clone, G: Clone, H: Clone, DefaultCollate: Collate<A> + Collate<B> + Collate<C> + Collate<D> + Collate<E> + Collate<F> + Collate<G> + Collate<H>,

Source§

type Output = (<DefaultCollate as Collate<A>>::Output, <DefaultCollate as Collate<B>>::Output, <DefaultCollate as Collate<C>>::Output, <DefaultCollate as Collate<D>>::Output, <DefaultCollate as Collate<E>>::Output, <DefaultCollate as Collate<F>>::Output, <DefaultCollate as Collate<G>>::Output, <DefaultCollate as Collate<H>>::Output)

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<(A, B, C, D, E, F, G, H)>) -> Self::Output

Take a batch of samples and collate them
Source§

impl<A, B, C, D, E, F, G, H, I> Collate<(A, B, C, D, E, F, G, H, I)> for DefaultCollate
where A: Clone, B: Clone, C: Clone, D: Clone, E: Clone, F: Clone, G: Clone, H: Clone, I: Clone, DefaultCollate: Collate<A> + Collate<B> + Collate<C> + Collate<D> + Collate<E> + Collate<F> + Collate<G> + Collate<H> + Collate<I>,

Source§

type Output = (<DefaultCollate as Collate<A>>::Output, <DefaultCollate as Collate<B>>::Output, <DefaultCollate as Collate<C>>::Output, <DefaultCollate as Collate<D>>::Output, <DefaultCollate as Collate<E>>::Output, <DefaultCollate as Collate<F>>::Output, <DefaultCollate as Collate<G>>::Output, <DefaultCollate as Collate<H>>::Output, <DefaultCollate as Collate<I>>::Output)

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<(A, B, C, D, E, F, G, H, I)>) -> Self::Output

Take a batch of samples and collate them
Source§

impl<A, B, C, D, E, F, G, H, I, J> Collate<(A, B, C, D, E, F, G, H, I, J)> for DefaultCollate
where A: Clone, B: Clone, C: Clone, D: Clone, E: Clone, F: Clone, G: Clone, H: Clone, I: Clone, J: Clone, DefaultCollate: Collate<A> + Collate<B> + Collate<C> + Collate<D> + Collate<E> + Collate<F> + Collate<G> + Collate<H> + Collate<I> + Collate<J>,

Source§

type Output = (<DefaultCollate as Collate<A>>::Output, <DefaultCollate as Collate<B>>::Output, <DefaultCollate as Collate<C>>::Output, <DefaultCollate as Collate<D>>::Output, <DefaultCollate as Collate<E>>::Output, <DefaultCollate as Collate<F>>::Output, <DefaultCollate as Collate<G>>::Output, <DefaultCollate as Collate<H>>::Output, <DefaultCollate as Collate<I>>::Output, <DefaultCollate as Collate<J>>::Output)

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<(A, B, C, D, E, F, G, H, I, J)>) -> Self::Output

Take a batch of samples and collate them
Source§

impl<A, B, C, D, E, F, G, H, I, J, K> Collate<(A, B, C, D, E, F, G, H, I, J, K)> for DefaultCollate
where A: Clone, B: Clone, C: Clone, D: Clone, E: Clone, F: Clone, G: Clone, H: Clone, I: Clone, J: Clone, K: Clone, DefaultCollate: Collate<A> + Collate<B> + Collate<C> + Collate<D> + Collate<E> + Collate<F> + Collate<G> + Collate<H> + Collate<I> + Collate<J> + Collate<K>,

Source§

type Output = (<DefaultCollate as Collate<A>>::Output, <DefaultCollate as Collate<B>>::Output, <DefaultCollate as Collate<C>>::Output, <DefaultCollate as Collate<D>>::Output, <DefaultCollate as Collate<E>>::Output, <DefaultCollate as Collate<F>>::Output, <DefaultCollate as Collate<G>>::Output, <DefaultCollate as Collate<H>>::Output, <DefaultCollate as Collate<I>>::Output, <DefaultCollate as Collate<J>>::Output, <DefaultCollate as Collate<K>>::Output)

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<(A, B, C, D, E, F, G, H, I, J, K)>) -> Self::Output

Take a batch of samples and collate them
Source§

impl<A, B, C, D, E, F, G, H, I, J, K, L> Collate<(A, B, C, D, E, F, G, H, I, J, K, L)> for DefaultCollate
where A: Clone, B: Clone, C: Clone, D: Clone, E: Clone, F: Clone, G: Clone, H: Clone, I: Clone, J: Clone, K: Clone, L: Clone, DefaultCollate: Collate<A> + Collate<B> + Collate<C> + Collate<D> + Collate<E> + Collate<F> + Collate<G> + Collate<H> + Collate<I> + Collate<J> + Collate<K> + Collate<L>,

Source§

type Output = (<DefaultCollate as Collate<A>>::Output, <DefaultCollate as Collate<B>>::Output, <DefaultCollate as Collate<C>>::Output, <DefaultCollate as Collate<D>>::Output, <DefaultCollate as Collate<E>>::Output, <DefaultCollate as Collate<F>>::Output, <DefaultCollate as Collate<G>>::Output, <DefaultCollate as Collate<H>>::Output, <DefaultCollate as Collate<I>>::Output, <DefaultCollate as Collate<J>>::Output, <DefaultCollate as Collate<K>>::Output, <DefaultCollate as Collate<L>>::Output)

The type of the collate function’s output
Source§

fn collate( &self, batch: Vec<(A, B, C, D, E, F, G, H, I, J, K, L)>, ) -> Self::Output

Take a batch of samples and collate them
Source§

impl<A, D> Collate<ArrayBase<OwnedRepr<A>, D>> for DefaultCollate
where A: Clone, D: Dimension, D::Larger: RemoveAxis,

Source§

type Output = ArrayBase<OwnedRepr<A>, <D as Dimension>::Larger>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<Array<A, D>>) -> Self::Output

Take a batch of samples and collate them
Source§

impl<K, V> Collate<BTreeMap<K, V>> for DefaultCollate
where K: Ord + Clone, V: Clone, Self: Collate<V>,

Source§

type Output = BTreeMap<K, <DefaultCollate as Collate<V>>::Output>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<BTreeMap<K, V>>) -> Self::Output

Take a batch of samples and collate them
Source§

impl Collate<CString> for DefaultCollate

Source§

type Output = Vec<CString>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<CString>) -> Self::Output

Take a batch of samples and collate them
Source§

impl<K, V, H> Collate<HashMap<K, V, H>> for DefaultCollate
where K: Eq + Hash + Clone, V: Clone, Self: Collate<V>, H: BuildHasher,

Source§

type Output = HashMap<K, <DefaultCollate as Collate<V>>::Output>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<HashMap<K, V, H>>) -> Self::Output

Take a batch of samples and collate them
Source§

impl Collate<NonZero<i128>> for DefaultCollate

Source§

type Output = ArrayBase<OwnedRepr<NonZero<i128>>, Dim<[usize; 1]>>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<NonZeroI128>) -> Self::Output

Take a batch of samples and collate them
Source§

impl Collate<NonZero<i16>> for DefaultCollate

Source§

type Output = ArrayBase<OwnedRepr<NonZero<i16>>, Dim<[usize; 1]>>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<NonZeroI16>) -> Self::Output

Take a batch of samples and collate them
Source§

impl Collate<NonZero<i32>> for DefaultCollate

Source§

type Output = ArrayBase<OwnedRepr<NonZero<i32>>, Dim<[usize; 1]>>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<NonZeroI32>) -> Self::Output

Take a batch of samples and collate them
Source§

impl Collate<NonZero<i64>> for DefaultCollate

Source§

type Output = ArrayBase<OwnedRepr<NonZero<i64>>, Dim<[usize; 1]>>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<NonZeroI64>) -> Self::Output

Take a batch of samples and collate them
Source§

impl Collate<NonZero<i8>> for DefaultCollate

Source§

type Output = ArrayBase<OwnedRepr<NonZero<i8>>, Dim<[usize; 1]>>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<NonZeroI8>) -> Self::Output

Take a batch of samples and collate them
Source§

impl Collate<NonZero<isize>> for DefaultCollate

Source§

type Output = ArrayBase<OwnedRepr<NonZero<isize>>, Dim<[usize; 1]>>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<NonZeroIsize>) -> Self::Output

Take a batch of samples and collate them
Source§

impl Collate<NonZero<u128>> for DefaultCollate

Source§

type Output = ArrayBase<OwnedRepr<NonZero<u128>>, Dim<[usize; 1]>>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<NonZeroU128>) -> Self::Output

Take a batch of samples and collate them
Source§

impl Collate<NonZero<u16>> for DefaultCollate

Source§

type Output = ArrayBase<OwnedRepr<NonZero<u16>>, Dim<[usize; 1]>>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<NonZeroU16>) -> Self::Output

Take a batch of samples and collate them
Source§

impl Collate<NonZero<u32>> for DefaultCollate

Source§

type Output = ArrayBase<OwnedRepr<NonZero<u32>>, Dim<[usize; 1]>>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<NonZeroU32>) -> Self::Output

Take a batch of samples and collate them
Source§

impl Collate<NonZero<u64>> for DefaultCollate

Source§

type Output = ArrayBase<OwnedRepr<NonZero<u64>>, Dim<[usize; 1]>>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<NonZeroU64>) -> Self::Output

Take a batch of samples and collate them
Source§

impl Collate<NonZero<u8>> for DefaultCollate

Source§

type Output = ArrayBase<OwnedRepr<NonZero<u8>>, Dim<[usize; 1]>>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<NonZeroU8>) -> Self::Output

Take a batch of samples and collate them
Source§

impl Collate<NonZero<usize>> for DefaultCollate

Source§

type Output = ArrayBase<OwnedRepr<NonZero<usize>>, Dim<[usize; 1]>>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<NonZeroUsize>) -> Self::Output

Take a batch of samples and collate them
Source§

impl Collate<OsString> for DefaultCollate

Source§

type Output = Vec<OsString>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<OsString>) -> Self::Output

Take a batch of samples and collate them
Source§

impl Collate<String> for DefaultCollate

Source§

type Output = Vec<String>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<String>) -> Self::Output

Take a batch of samples and collate them
Source§

impl<T> Collate<Vec<T>> for DefaultCollate
where Self: Collate<T>, T: Clone,

Source§

type Output = Vec<<DefaultCollate as Collate<T>>::Output>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<Vec<T>>) -> Self::Output

Take a batch of samples and collate them
Source§

impl<T> Collate<VecDeque<T>> for DefaultCollate
where Self: Collate<T>, T: Clone,

Source§

type Output = Vec<<DefaultCollate as Collate<T>>::Output>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<VecDeque<T>>) -> Self::Output

Take a batch of samples and collate them
Source§

impl Collate<bool> for DefaultCollate

Source§

type Output = ArrayBase<OwnedRepr<bool>, Dim<[usize; 1]>>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<bool>) -> Self::Output

Take a batch of samples and collate them
Source§

impl Collate<char> for DefaultCollate

Source§

type Output = ArrayBase<OwnedRepr<char>, Dim<[usize; 1]>>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<char>) -> Self::Output

Take a batch of samples and collate them
Source§

impl Collate<f32> for DefaultCollate

Source§

type Output = ArrayBase<OwnedRepr<f32>, Dim<[usize; 1]>>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<f32>) -> Self::Output

Take a batch of samples and collate them
Source§

impl Collate<f64> for DefaultCollate

Source§

type Output = ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<f64>) -> Self::Output

Take a batch of samples and collate them
Source§

impl Collate<i128> for DefaultCollate

Source§

type Output = ArrayBase<OwnedRepr<i128>, Dim<[usize; 1]>>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<i128>) -> Self::Output

Take a batch of samples and collate them
Source§

impl Collate<i16> for DefaultCollate

Source§

type Output = ArrayBase<OwnedRepr<i16>, Dim<[usize; 1]>>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<i16>) -> Self::Output

Take a batch of samples and collate them
Source§

impl Collate<i32> for DefaultCollate

Source§

type Output = ArrayBase<OwnedRepr<i32>, Dim<[usize; 1]>>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<i32>) -> Self::Output

Take a batch of samples and collate them
Source§

impl Collate<i64> for DefaultCollate

Source§

type Output = ArrayBase<OwnedRepr<i64>, Dim<[usize; 1]>>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<i64>) -> Self::Output

Take a batch of samples and collate them
Source§

impl Collate<i8> for DefaultCollate

Source§

type Output = ArrayBase<OwnedRepr<i8>, Dim<[usize; 1]>>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<i8>) -> Self::Output

Take a batch of samples and collate them
Source§

impl Collate<isize> for DefaultCollate

Source§

type Output = ArrayBase<OwnedRepr<isize>, Dim<[usize; 1]>>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<isize>) -> Self::Output

Take a batch of samples and collate them
Source§

impl Collate<u128> for DefaultCollate

Source§

type Output = ArrayBase<OwnedRepr<u128>, Dim<[usize; 1]>>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<u128>) -> Self::Output

Take a batch of samples and collate them
Source§

impl Collate<u16> for DefaultCollate

Source§

type Output = ArrayBase<OwnedRepr<u16>, Dim<[usize; 1]>>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<u16>) -> Self::Output

Take a batch of samples and collate them
Source§

impl Collate<u32> for DefaultCollate

Source§

type Output = ArrayBase<OwnedRepr<u32>, Dim<[usize; 1]>>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<u32>) -> Self::Output

Take a batch of samples and collate them
Source§

impl Collate<u64> for DefaultCollate

Source§

type Output = ArrayBase<OwnedRepr<u64>, Dim<[usize; 1]>>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<u64>) -> Self::Output

Take a batch of samples and collate them
Source§

impl Collate<u8> for DefaultCollate

NoOp for binary, as pytorch default_collate function.

Source§

type Output = Vec<u8>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<u8>) -> Self::Output

Take a batch of samples and collate them
Source§

impl Collate<usize> for DefaultCollate

Source§

type Output = ArrayBase<OwnedRepr<usize>, Dim<[usize; 1]>>

The type of the collate function’s output
Source§

fn collate(&self, batch: Vec<usize>) -> Self::Output

Take a batch of samples and collate them
Source§

impl Debug for DefaultCollate

Source§

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

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

impl Default for DefaultCollate

Source§

fn default() -> DefaultCollate

Returns the “default value” for a type. Read more
Source§

impl Ord for DefaultCollate

Source§

fn cmp(&self, other: &DefaultCollate) -> Ordering

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

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for DefaultCollate

Source§

fn eq(&self, other: &DefaultCollate) -> 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 PartialOrd for DefaultCollate

Source§

fn partial_cmp(&self, other: &DefaultCollate) -> 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 Eq for DefaultCollate

Source§

impl StructuralPartialEq for DefaultCollate

Auto Trait Implementations§

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
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V