Trait SetTitle

Source
pub trait SetTitle {
    // Required methods
    fn set_title<'a>(&mut self, text: impl IntoText<'a>);
    fn set_subtitle<'a>(&mut self, text: impl IntoText<'a>);
    fn set_action_bar<'a>(&mut self, text: impl IntoText<'a>);
    fn set_title_times(&mut self, fade_in: i32, stay: i32, fade_out: i32);
    fn clear_title(&mut self);
    fn reset_title(&mut self);
}

Required Methods§

Source

fn set_title<'a>(&mut self, text: impl IntoText<'a>)

Displays a title to a client.

A title is a large piece of text displayed in the center of the screen which may also include a subtitle underneath it. The title can be configured to fade in and out using set_title_times.

Source

fn set_subtitle<'a>(&mut self, text: impl IntoText<'a>)

Source

fn set_action_bar<'a>(&mut self, text: impl IntoText<'a>)

Source

fn set_title_times(&mut self, fade_in: i32, stay: i32, fade_out: i32)

  • fade_in: Ticks to spend fading in.
  • stay: Ticks to keep the title displayed.
  • fade_out: Ticks to spend fading out.
Source

fn clear_title(&mut self)

Source

fn reset_title(&mut self)

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.

Implementors§

Source§

impl<T> SetTitle for T
where T: WritePacket,