pub struct FileBlockBuilder { /* private fields */ }Expand description
Consuming builder for FileBlock. Validation runs in Self::build.
Implementations§
Source§impl FileBlockBuilder
impl FileBlockBuilder
Sourcepub fn external_id(self, value: impl Into<String>) -> Self
pub fn external_id(self, value: impl Into<String>) -> Self
Sets the external identifier of a remote file previously added with the files.remote API.
Sourcepub fn source(self, value: impl Into<String>) -> Self
pub fn source(self, value: impl Into<String>) -> Self
Sets the file source. Slack currently supports only remote files.
Sourcepub fn block_id(self, value: impl Into<String>) -> Self
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.
Sourcepub fn clear_block_id(self) -> Self
pub fn clear_block_id(self) -> Self
Omits block_id, including any model default.
Sourcepub fn extension(self, key: impl Into<String>, value: impl Into<Value>) -> Self
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.
Sourcepub fn build(self) -> Result<FileBlock, ValidationError>
pub fn build(self) -> Result<FileBlock, 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 FileBlockBuilder
impl Clone for FileBlockBuilder
Source§impl Debug for FileBlockBuilder
impl Debug for FileBlockBuilder
Auto Trait Implementations§
impl Forget for FileBlockBuilder
impl Freeze for FileBlockBuilder
impl Move for FileBlockBuilder
impl RefUnwindSafe for FileBlockBuilder
impl Send for FileBlockBuilder
impl Sync for FileBlockBuilder
impl Unpin for FileBlockBuilder
impl UnsafeUnpin for FileBlockBuilder
impl UnwindSafe for FileBlockBuilder
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