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§
source§impl FromStr for Never
impl FromStr for Never
source§fn 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.
source§impl Ord for Never
impl Ord for Never
source§impl PartialEq<Never> for Never
impl PartialEq<Never> for Never
source§impl PartialOrd<Never> for Never
impl PartialOrd<Never> for Never
1.0.0 · source§fn 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