[][src]Struct slack_blocks::blocks::actions::Contents

pub struct Contents { /* fields omitted */ }

Implementations

impl Contents[src]

pub fn new() -> Self[src]

Create a empty Actions block

pub fn from_elements<Els: Into<Vec<BlockElement>>>(
    elements: Els
) -> Result<Self, ()>
[src]

Populate an Actions block with a collection of BlockElements that may not be supported by Actions blocks.

For an infallible version of this conversion function, see from_action_elements.

Errors

Errors if the block_elements::BlockElement is one that is not supported by Actions blocks.

For a list of BlockElement types that are, see self::BlockElement.

Runtime Validation

only validates that the block elements are compatible with Actions, for full runtime model validation see the validate method.

pub fn from_action_elements<Els: Into<Vec<BlockElement>>>(elements: Els) -> Self[src]

Populate an Actions block with a collection of BlockElements that are supported by Actions blocks.

For slightly easier to use (but fallible) version of this conversion function, see from_action_elements.

Runtime Validation

only validates that the block elements are compatible with Actions, for full runtime model validation see the validate method.

pub fn validate(&self) -> ValidationResult[src]

Validate the entire block and all of its elements against Slack's model requirements

Trait Implementations

impl Clone for Contents[src]

impl Debug for Contents[src]

impl Default for Contents[src]

impl<'de> Deserialize<'de> for Contents[src]

impl From<Vec<BlockElement>> for Contents[src]

impl Hash for Contents[src]

impl PartialEq<Contents> for Contents[src]

impl Serialize for Contents[src]

impl StructuralPartialEq for Contents[src]

impl TryFrom<Vec<BlockElement>> for Contents[src]

type Error = ()

The type returned in the event of a conversion error.

impl Validate for Contents[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.