pub struct RichTextChannelBuilder { /* private fields */ }Expand description
Consuming builder for RichTextChannel. Validation runs in Self::build.
Implementations§
Source§impl RichTextChannelBuilder
impl RichTextChannelBuilder
Sourcepub fn channel_id(self, value: impl Into<String>) -> Self
pub fn channel_id(self, value: impl Into<String>) -> Self
Sets the ID of the mentioned channel.
Sourcepub fn style(self, value: RichTextStyle) -> Self
pub fn style(self, value: RichTextStyle) -> Self
Sets the mention style.
Sourcepub fn clear_style(self) -> Self
pub fn clear_style(self) -> Self
Omits style, 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<RichTextChannel, ValidationError>
pub fn build(self) -> Result<RichTextChannel, 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 RichTextChannelBuilder
impl Clone for RichTextChannelBuilder
Source§impl Debug for RichTextChannelBuilder
impl Debug for RichTextChannelBuilder
Auto Trait Implementations§
impl Forget for RichTextChannelBuilder
impl Freeze for RichTextChannelBuilder
impl Move for RichTextChannelBuilder
impl RefUnwindSafe for RichTextChannelBuilder
impl Send for RichTextChannelBuilder
impl Sync for RichTextChannelBuilder
impl Unpin for RichTextChannelBuilder
impl UnsafeUnpin for RichTextChannelBuilder
impl UnwindSafe for RichTextChannelBuilder
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