Skip to main content

MaybeDisplay

Trait MaybeDisplay 

Source
pub(crate) trait MaybeDisplay {
    // Required method
    fn maybe_display(self) -> impl Display;
}

Required Methods§

Source

fn maybe_display(self) -> impl Display

For a given Option<T: Display>, returns a Display implementation that will display t if Some(t), or nothing if None.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T: Display> MaybeDisplay for Option<T>

Implementors§