pub trait StalinSortable {
// Required methods
unsafe fn stalin_sort(&self) -> Self;
unsafe fn stalin_sort_gtg(&self) -> (Self, Self)
where Self: Sized;
}Required Methods§
Sourceunsafe fn stalin_sort(&self) -> Self
unsafe fn stalin_sort(&self) -> Self
This function is marked unsafe, because well, would you feel safe if Stalin came to sort your list?
Sourceunsafe fn stalin_sort_gtg(&self) -> (Self, Self)where
Self: Sized,
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.