pub trait TextFormat {
// Required methods
fn bold<S>(&self, text: S) -> String
where S: AsRef<str>;
fn italic<S>(&self, text: S) -> String
where S: AsRef<str>;
fn underline<S>(&self, text: S) -> String
where S: AsRef<str>;
fn mono<S>(&self, text: S) -> String
where S: AsRef<str>;
fn code<S>(&self, text: S) -> String
where S: AsRef<str>;
fn strikethrough<S>(&self, text: S) -> String
where S: AsRef<str>;
fn superscript<S>(&self, text: S) -> String
where S: AsRef<str>;
fn subscript<S>(&self, text: S) -> String
where S: AsRef<str>;
}
Required Methods§
fn bold<S>(&self, text: S) -> String
fn italic<S>(&self, text: S) -> String
fn underline<S>(&self, text: S) -> String
fn mono<S>(&self, text: S) -> String
fn code<S>(&self, text: S) -> String
fn strikethrough<S>(&self, text: S) -> String
fn superscript<S>(&self, text: S) -> String
fn subscript<S>(&self, text: S) -> 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.