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, &'static str>
fn from_str(_: &str) -> Result<Never, &'static str>
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;
use std::str::FromStr;
assert_eq!(Never::from_str("abc"), Err("Never has no possible values"));
sourceimpl Ord for Never
impl Ord for Never
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>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
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 more
impl 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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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