pub struct RichTextCodeBlockBuilder { /* private fields */ }Expand description
Consuming builder for RichTextCodeBlock. Validation runs in Self::build.
Implementations§
Source§impl RichTextCodeBlockBuilder
impl RichTextCodeBlockBuilder
Sourcepub fn elements<I, T>(self, values: I) -> Self
pub fn elements<I, T>(self, values: I) -> Self
Adds inline rich text elements in display order. Replaces the collection; order is preserved.
Sourcepub fn element(self, value: impl Into<RichTextSectionElement>) -> Self
pub fn element(self, value: impl Into<RichTextSectionElement>) -> Self
Appends one item to the collection.
Sourcepub fn clear_border(self) -> Self
pub fn clear_border(self) -> Self
Omits border, 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<RichTextCodeBlock, ValidationError>
pub fn build(self) -> Result<RichTextCodeBlock, 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 RichTextCodeBlockBuilder
impl Clone for RichTextCodeBlockBuilder
Source§impl Debug for RichTextCodeBlockBuilder
impl Debug for RichTextCodeBlockBuilder
Auto Trait Implementations§
impl Forget for RichTextCodeBlockBuilder
impl Freeze for RichTextCodeBlockBuilder
impl Move for RichTextCodeBlockBuilder
impl RefUnwindSafe for RichTextCodeBlockBuilder
impl Send for RichTextCodeBlockBuilder
impl Sync for RichTextCodeBlockBuilder
impl Unpin for RichTextCodeBlockBuilder
impl UnsafeUnpin for RichTextCodeBlockBuilder
impl UnwindSafe for RichTextCodeBlockBuilder
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