Struct RadixSortStrategyWith

Source
pub struct RadixSortStrategyWith<B, S> {
    pub bytes: B,
    pub sort: S,
}
Expand description

A radix sort strategy with a given byte extraction function and fallback sort

Fields§

§bytes: B

The byte-extraction method of this strategy

§sort: S

The fallback sort used by this strategy

Trait Implementations§

Source§

impl<B: Clone, S: Clone> Clone for RadixSortStrategyWith<B, S>

Source§

fn clone(&self) -> RadixSortStrategyWith<B, S>

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<B: Debug, S: Debug> Debug for RadixSortStrategyWith<B, S>

Source§

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

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

impl<B, S, K> KeyBytes<K> for RadixSortStrategyWith<B, S>
where B: KeyBytes<K>,

Source§

const HAS_CONST_KEY_LEN: bool = B::HAS_CONST_KEY_LEN

Get whether the key length for this type is always constant
Source§

const MAX_KEY_LEN: Option<usize> = B::MAX_KEY_LEN

Get the maximum key length for this type
Source§

fn has_const_key_len(&self) -> bool

Whether this key length is constant
Source§

fn max_key_len(&self) -> Option<usize>

The maximum key length
Source§

fn key_len(&self, key: &K) -> usize

The length of a given key
Source§

fn key_byte(&self, key: &K, byte: usize) -> u8

Get the nth byte of a given key. byte must be less than self.len(key)
Source§

impl<B, S, K> TrySorter<K> for RadixSortStrategyWith<B, S>
where S: TrySorter<K>,

Source§

fn try_sort( &mut self, arr: &mut [K], depth: isize, iteration: usize, force: bool, ) -> bool

Try to sort arr, assuming we’re at a given depth and iteration. Return whether the array was sorted. If force is true, then should always sort.
Source§

impl<B: Copy, S: Copy> Copy for RadixSortStrategyWith<B, S>

Auto Trait Implementations§

§

impl<B, S> Freeze for RadixSortStrategyWith<B, S>
where B: Freeze, S: Freeze,

§

impl<B, S> RefUnwindSafe for RadixSortStrategyWith<B, S>

§

impl<B, S> Send for RadixSortStrategyWith<B, S>
where B: Send, S: Send,

§

impl<B, S> Sync for RadixSortStrategyWith<B, S>
where B: Sync, S: Sync,

§

impl<B, S> Unpin for RadixSortStrategyWith<B, S>
where B: Unpin, S: Unpin,

§

impl<B, S> UnwindSafe for RadixSortStrategyWith<B, S>
where B: UnwindSafe, S: 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
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> 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<T, K> RadixSortStrategy<K> for T
where T: KeyBytes<K> + TrySorter<K>,