pub struct SectionBlock {
pub text: Option<TextObject>,
pub block_id: Option<String>,
pub fields: Option<Vec<TextObject>>,
pub accessory: Option<Value>,
/* private fields */
}Expand description
Section block - displays text and optional accessory
Fields§
§text: Option<TextObject>§block_id: Option<String>§fields: Option<Vec<TextObject>>§accessory: Option<Value>Implementations§
Source§impl SectionBlock
impl SectionBlock
Sourcepub fn text_object(self, text: TextObject) -> Self
pub fn text_object(self, text: TextObject) -> Self
Set text object directly
Sourcepub fn fields(self, fields: Vec<TextObject>) -> Self
pub fn fields(self, fields: Vec<TextObject>) -> Self
Add fields (up to 10)
Sourcepub fn field(self, field: TextObject) -> Self
pub fn field(self, field: TextObject) -> Self
Add a field
Trait Implementations§
Source§impl Clone for SectionBlock
impl Clone for SectionBlock
Source§fn clone(&self) -> SectionBlock
fn clone(&self) -> SectionBlock
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SectionBlock
impl Debug for SectionBlock
Source§impl Default for SectionBlock
impl Default for SectionBlock
Source§impl<'de> Deserialize<'de> for SectionBlock
impl<'de> Deserialize<'de> for SectionBlock
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
Auto Trait Implementations§
impl Freeze for SectionBlock
impl RefUnwindSafe for SectionBlock
impl Send for SectionBlock
impl Sync for SectionBlock
impl Unpin for SectionBlock
impl UnwindSafe for SectionBlock
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