Skip to main content

VideoBlockBuilder

Struct VideoBlockBuilder 

Source
pub struct VideoBlockBuilder { /* private fields */ }
Expand description

Consuming builder for VideoBlock. Validation runs in Self::build.

Implementations§

Source§

impl VideoBlockBuilder

Source

pub fn alt_text(self, value: impl Into<String>) -> Self

Sets a plain-text summary of the image or video for assistive technology.

Source

pub fn thumbnail_url(self, value: impl Into<String>) -> Self

Sets the URL of the image shown before the video plays.

Source

pub fn title(self, value: impl Into<PlainTextInput>) -> Self

Sets the video title.

Source

pub fn video_url(self, value: impl Into<String>) -> Self

Sets the embeddable URL of the video. The domain must be listed in the app’s unfurl domains.

Source

pub fn block_id(self, value: impl Into<String>) -> Self

Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.

Source

pub fn clear_block_id(self) -> Self

Omits block_id, including any model default.

Source

pub fn author_name(self, value: impl Into<String>) -> Self

Sets the name of the video’s author.

Source

pub fn clear_author_name(self) -> Self

Omits author_name, including any model default.

Source

pub fn description(self, value: impl Into<PlainTextInput>) -> Self

Sets the video description.

Source

pub fn clear_description(self) -> Self

Omits description, including any model default.

Source

pub fn provider_icon_url(self, value: impl Into<String>) -> Self

Sets the URL of the video provider’s icon.

Source

pub fn clear_provider_icon_url(self) -> Self

Omits provider_icon_url, including any model default.

Source

pub fn provider_name(self, value: impl Into<String>) -> Self

Sets the name of the video provider, such as YouTube.

Source

pub fn clear_provider_name(self) -> Self

Omits provider_name, including any model default.

Source

pub fn title_url(self, value: impl Into<String>) -> Self

Sets the HTTPS URL opened when the title is clicked.

Source

pub fn clear_title_url(self) -> Self

Omits title_url, including any model default.

Source

pub fn extension(self, key: impl Into<String>, value: impl Into<Value>) -> Self

Adds or replaces an unmodeled extension; reserved names fail at build time.

Source

pub fn build(self) -> Result<VideoBlock, ValidationError>

Validates all fields and their receiving context.

§Errors

Returns a ValidationError for missing fields, invalid values, reserved extension names, or unsupported field combinations and child contexts.

Trait Implementations§

Source§

impl Clone for VideoBlockBuilder

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for VideoBlockBuilder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for VideoBlockBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.