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 Tend: *mut Tdst: *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
selfis initialized in a way wherestart -> endis the longer sub-slice and so thatdstcan be written to at least the shorter sub-slice length times. In additionstart -> endandright -> right_endMUST 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
selfis initialized in a way whereleft_end <- dstis the shorter sub-slice and so thatoutcan be written to at least the shorter sub-slice length times. In additionleft_end <- dstandright_end <- endMUST 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) -> TReturns the argument unchanged.
impl<T> SizeHint for MergeState<T>
where
T: ?Sized,
fn lower_bound(&self) -> usizefn 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) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses 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>