Struct MergeState

pub(in ::slice::sort::stable::merge) struct MergeState<T> { pub(in ::slice::sort::stable::merge) start: *mut T, pub(in ::slice::sort::stable::merge) end: *mut T, pub(in ::slice::sort::stable::merge) dst: *mut T }

Fields

start: *mut T
end: *mut T
dst: *mut T

Implementations

impl<T> MergeState<T>

unsafe fn merge_up<F: FnMut(&T, &T) -> bool>(&mut self, right: *const T, right_end: *const T, is_less: &mut F)

Safety

The caller MUST guarantee that self is initialized in a way where start -> end is the longer sub-slice and so that dst can be written to at least the shorter sub-slice length times. In addition start -> end and right -> right_end MUST be valid to be read. This function MUST only be called once.

unsafe fn merge_down<F: FnMut(&T, &T) -> bool>(&mut self, left_end: *const T, right_end: *const T, out: *mut T, is_less: &mut F)

Safety

The caller MUST guarantee that self is initialized in a way where left_end <- dst is the shorter sub-slice and so that out can be written to at least the shorter sub-slice length times. In addition left_end <- dst and right_end <- end MUST be valid to be read. This function MUST only be called once.

Trait Implementations

impl<T> Drop for MergeState<T>

fn drop(&mut self)

Auto Trait Implementations

impl<T> !Send for MergeState<T>

impl<T> !Sync for MergeState<T>

impl<T> Freeze for MergeState<T> where *mut T: Freeze + Freeze + Freeze,

impl<T> RefUnwindSafe for MergeState<T> where *mut T: RefUnwindSafe + RefUnwindSafe + RefUnwindSafe,

impl<T> Unpin for MergeState<T> where *mut T: Unpin + Unpin + Unpin,

impl<T> UnsafeUnpin for MergeState<T> where *mut T: UnsafeUnpin + UnsafeUnpin + UnsafeUnpin,

impl<T> UnwindSafe for MergeState<T> where *mut T: UnwindSafe + UnwindSafe + UnwindSafe,

Blanket Implementations

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

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

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

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

impl<T> From<T> for MergeState<T>

fn from(t: T) -> T

Returns the argument unchanged.

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

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

impl<T> SizedTypeProperties for MergeState<T>

impl<T, U> Into<U> for MergeState<T> 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 MergeState<T> 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 MergeState<T> where U: TryFrom<T>,

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