pub enum Block {
Heading(String),
Text(String),
Fields(Vec<(String, String)>),
Divider,
Action {
label: String,
url: String,
},
}Expand description
One piece of a notification. Transport-agnostic; senders decide how to render each block.
Variants§
Heading(String)
A heading / section title.
Text(String)
A paragraph of body text.
Fields(Vec<(String, String)>)
Key/value pairs (rendered as a definition list or key: value lines).
Divider
A visual separator.
Action
A call to action with a label + URL.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Block
impl<'de> Deserialize<'de> for Block
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 Block
Auto Trait Implementations§
impl Freeze for Block
impl RefUnwindSafe for Block
impl Send for Block
impl Sync for Block
impl Unpin for Block
impl UnsafeUnpin for Block
impl UnwindSafe for Block
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