#[non_exhaustive]pub enum Format {
Show 15 variants
Bold,
Italic,
StrikeThrough,
Snippet,
Secret,
Small,
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
Small
Colored
Uri
HyperLink
SimplexLink
Command
Mention
Phone
Undocumented(JsonObject)
Implementations§
Source§impl Format
impl Format
pub fn make_bold() -> Self
pub fn make_italic() -> Self
pub fn make_strike_through() -> Self
pub fn make_snippet() -> Self
pub fn make_secret() -> Self
pub fn make_small() -> Self
pub fn make_colored(color: Color) -> Self
pub fn make_uri() -> Self
pub fn make_hyper_link(show_text: Option<String>, link_uri: String) -> Self
pub fn make_simplex_link( show_text: Option<String>, link_type: SimplexLinkType, simplex_uri: String, smp_hosts: Vec<String>, ) -> Self
pub fn make_command(command_str: String) -> Self
pub fn make_mention(member_name: String) -> Self
pub fn make_email() -> Self
pub fn make_phone() -> Self
Source§impl Format
impl Format
pub fn is_bold(&self) -> bool
pub fn is_italic(&self) -> bool
pub fn is_strike_through(&self) -> bool
pub fn is_snippet(&self) -> bool
pub fn is_secret(&self) -> bool
pub fn is_small(&self) -> bool
pub fn colored(&self) -> Option<&Color>
pub fn is_uri(&self) -> bool
pub fn hyper_link(&self) -> Option<FormatHyperLinkRef<'_>>
pub fn simplex_link(&self) -> Option<FormatSimplexLinkRef<'_>>
pub fn command(&self) -> Option<&String>
pub fn mention(&self) -> Option<&String>
pub fn is_email(&self) -> bool
pub fn is_phone(&self) -> bool
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