Skip to main content

TitleFn

Trait TitleFn 

Source
pub trait TitleFn<State> {
    // Required method
    fn title(&self, state: &State) -> String;
}
Expand description

The title logic of some Application.

This trait is implemented both for &static str and any closure Fn(&State) -> String.

This trait allows the application builder to take any of them.

Required Methods§

Source

fn title(&self, state: &State) -> String

Produces the title of the Application.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<State> TitleFn<State> for &'static str

Source§

fn title(&self, _state: &State) -> String

Implementors§

Source§

impl<T, State> TitleFn<State> for T
where T: Fn(&State) -> String,