Trait Noned

Source
pub trait Noned {
    // Required methods
    fn is_none(&self) -> bool;
    fn get_none() -> Self;
}
Expand description

A trait whose implementation for any type T allows the use of Optioned<T> where T is bound by both Sized and Copy.

Required Methods§

Source

fn is_none(&self) -> bool

Returns true if the contained value is the declared None for T, false otherwise.

Source

fn get_none() -> Self

Returns the declared None value for T.

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 Noned for char

Source§

impl Noned for f32

Source§

impl Noned for f64

Source§

impl Noned for i8

Source§

impl Noned for i16

Source§

impl Noned for i32

Source§

impl Noned for i64

Source§

impl Noned for isize

Source§

impl Noned for u8

Source§

impl Noned for u16

Source§

impl Noned for u32

Source§

impl Noned for u64

Source§

impl Noned for usize

Implementors§