Enum malachite_base::nevers::Never
source · [−]pub enum Never {}
Expand description
Never
is a type that cannot be instantiated.
This is a bottom type.
Examples
use malachite_base::nevers::Never;
let x: Option<Never> = None;
Trait Implementations
sourceimpl FromStr for Never
impl FromStr for Never
sourcefn from_str(_: &str) -> Result<Never, NeverError>
fn from_str(_: &str) -> Result<Never, NeverError>
Would convert a String
to a Never
.
Since a Never
can never be instantiated, from_str
never succeeds.
Worst-case complexity
Constant time and additional memory.
Examples
use malachite_base::nevers::{Never, NeverError};
use std::str::FromStr;
assert_eq!(Never::from_str("abc"), Err(NeverError));
type Err = NeverError
type Err = NeverError
The associated error which can be returned from parsing.
sourceimpl Ord for Never
impl Ord for Never
1.21.0 · sourceconst fn max(self, other: Self) -> Self
const fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourceconst fn min(self, other: Self) -> Self
const fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<Never> for Never
impl PartialOrd<Never> for Never
sourcefn partial_cmp(&self, other: &Never) -> Option<Ordering>
fn partial_cmp(&self, other: &Never) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Never
impl Eq for Never
impl StructuralEq for Never
impl StructuralPartialEq for Never
Auto Trait Implementations
impl RefUnwindSafe for Never
impl Send for Never
impl Sync for Never
impl Unpin for Never
impl UnwindSafe for Never
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more