Skip to main content

Identifier

Trait Identifier 

Source
pub trait Identifier: Sized {
    // Required method
    fn fmt(&self, f: &mut Formatter<'_>) -> Result;

    // Provided method
    fn display(&self) -> impl Display { ... }
}

Required Methods§

Source

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Provided Methods§

Source

fn display(&self) -> impl Display

Returns a type that implements fmt::Display using this Identifier::fmt implementation.

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 Identifier for &str

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Source§

impl Identifier for String

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Implementors§