Skip to main content

Successor

Trait Successor 

Source
pub(crate) trait Successor: Sized {
    // Required method
    fn next(&self) -> Option<Self>;
}
Expand description

An object that has a single next element.

Required Methods§

Source

fn next(&self) -> Option<Self>

Return the next element after this one.

Returns None if this is the maximum value

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 Successor for u32

Source§

fn next(&self) -> Option<Self>

Source§

impl Successor for u128

Source§

fn next(&self) -> Option<Self>

Implementors§