Struct DriftsortRun

pub(in ::slice::sort::stable::drift) struct DriftsortRun(pub(in ::slice::sort::stable::drift) usize);

Compactly stores the length of a run, and whether or not it is sorted. This can always fit in a usize because the maximum slice length is isize::MAX.

Fields

0: usize

Implementations

impl DriftsortRun

fn new_sorted(length: usize) -> Self
fn new_unsorted(length: usize) -> Self
fn sorted(self) -> bool
fn len(self) -> usize

Trait Implementations

impl Clone for DriftsortRun

fn clone(&self) -> DriftsortRun

impl Copy for DriftsortRun

impl TrivialClone for DriftsortRun

Auto Trait Implementations

impl Freeze for DriftsortRun

impl RefUnwindSafe for DriftsortRun

impl Send for DriftsortRun

impl Sync for DriftsortRun

impl Unpin for DriftsortRun

impl UnsafeUnpin for DriftsortRun

impl UnwindSafe for DriftsortRun

Blanket Implementations

impl<T> Any for DriftsortRun where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for DriftsortRun where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for DriftsortRun where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

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

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

impl<T> From<T> for DriftsortRun

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> SizeHint for DriftsortRun where T: ?Sized,

fn lower_bound(&self) -> usize
fn upper_bound(&self) -> Option<usize>

impl<T> SizedTypeProperties for DriftsortRun

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

fn into(self) -> U

Calls U::from(self).

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

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

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

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

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