Skip to main content

StalinSortable

Trait StalinSortable 

Source
pub trait StalinSortable {
    // Required methods
    unsafe fn stalin_sort(&self) -> Self;
    unsafe fn stalin_sort_gtg(&self) -> (Self, Self)
       where Self: Sized;
}

Required Methods§

Source

unsafe fn stalin_sort(&self) -> Self

This function is marked unsafe, because well, would you feel safe if Stalin came to sort your list?

Source

unsafe fn stalin_sort_gtg(&self) -> (Self, Self)
where Self: Sized,

This function is marked unsafe, because well, would you feel safe if Stalin came to sort your list? The GTG part stands for ‘Got the gulag’, meaning it also returns the discarded elements that were sent to the gulag

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> StalinSortable for Vec<T>
where T: Clone + PartialOrd,

Source§

unsafe fn stalin_sort(&self) -> Self

Source§

unsafe fn stalin_sort_gtg(&self) -> (Self, Self)

Implementors§