pub trait MsgContentExt {
// Required methods
fn text_part(&self) -> Option<&str>;
fn text_part_mut(&mut self) -> Option<&mut String>;
fn preview(&self) -> Option<&str>;
fn preview_mut(&mut self) -> Option<&mut String>;
// Provided methods
fn set_text_part(&mut self, new_text: impl Into<String>) { ... }
fn set_preview(&mut self, new_preview: String) { ... }
}Required Methods§
fn text_part(&self) -> Option<&str>
fn text_part_mut(&mut self) -> Option<&mut String>
fn preview(&self) -> Option<&str>
fn preview_mut(&mut self) -> Option<&mut String>
Provided Methods§
fn set_text_part(&mut self, new_text: impl Into<String>)
fn set_preview(&mut self, new_preview: String)
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.