#[non_exhaustive]pub enum Format {
Show 14 variants
Bold,
Italic,
StrikeThrough,
Snippet,
Secret,
Colored {
color: Color,
undocumented: JsonObject,
},
Uri,
HyperLink {
show_text: Option<String>,
link_uri: String,
undocumented: JsonObject,
},
SimplexLink {
show_text: Option<String>,
link_type: SimplexLinkType,
simplex_uri: String,
smp_hosts: Vec<String>,
undocumented: JsonObject,
},
Command {
command_str: String,
undocumented: JsonObject,
},
Mention {
member_name: String,
undocumented: JsonObject,
},
Email,
Phone,
Undocumented(JsonObject),
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Bold
Italic
StrikeThrough
Snippet
Secret
Colored
Uri
HyperLink
SimplexLink
Command
Mention
Phone
Undocumented(JsonObject)
Implementations§
Source§impl Format
impl Format
pub fn bold() -> Self
pub fn italic() -> Self
pub fn strike_through() -> Self
pub fn snippet() -> Self
pub fn secret() -> Self
pub fn colored(color: Color) -> Self
pub fn uri() -> Self
pub fn hyper_link(show_text: Option<String>, link_uri: String) -> Self
pub fn simplex_link( show_text: Option<String>, link_type: SimplexLinkType, simplex_uri: String, smp_hosts: Vec<String>, ) -> Self
pub fn command(command_str: String) -> Self
pub fn mention(member_name: String) -> Self
pub fn email() -> Self
pub fn phone() -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Format
impl<'de> Deserialize<'de> for Format
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Format
Auto Trait Implementations§
impl Freeze for Format
impl RefUnwindSafe for Format
impl Send for Format
impl Sync for Format
impl Unpin for Format
impl UnsafeUnpin for Format
impl UnwindSafe for Format
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more