Skip to main content

MessageText

Trait MessageText 

Source
pub trait MessageText {
    // Required method
    fn text<'a>(&'a self) -> Option<String>;
}
Expand description

A trait to obtain text from a message.

For example, this will return the text from text messages, or the caption of a photo.

Required Methods§

Source

fn text<'a>(&'a self) -> Option<String>

Obtain text from a message if available.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§