pub struct Builder<T>(/* private fields */);Expand description
A builder for DocumentLayout
Implementations§
Source§impl Builder<IdStage>
impl Builder<IdStage>
Sourcepub fn id(self, id: Uuid) -> Builder<TextEditorJsonStage>
pub fn id(self, id: Uuid) -> Builder<TextEditorJsonStage>
Sets the id field.
Source§impl Builder<Complete>
impl Builder<Complete>
Sourcepub fn text_editor_json(self, text_editor_json: impl Into<String>) -> Self
pub fn text_editor_json(self, text_editor_json: impl Into<String>) -> Self
Sets the text_editor_json field.
Sourcepub fn insert_nodes(self, key: Uuid, value: DocumentNodeObject) -> Self
pub fn insert_nodes(self, key: Uuid, value: DocumentNodeObject) -> Self
Adds an entry to the nodes field.
Sourcepub fn nodes(
self,
nodes: impl IntoIterator<Item = (Uuid, DocumentNodeObject)>,
) -> Self
pub fn nodes( self, nodes: impl IntoIterator<Item = (Uuid, DocumentNodeObject)>, ) -> Self
Sets the nodes field.
Sourcepub fn extend_nodes(
self,
nodes: impl IntoIterator<Item = (Uuid, DocumentNodeObject)>,
) -> Self
pub fn extend_nodes( self, nodes: impl IntoIterator<Item = (Uuid, DocumentNodeObject)>, ) -> Self
Adds entries to the nodes field.
Sourcepub fn build(self) -> DocumentLayout
pub fn build(self) -> DocumentLayout
Consumes the builder, returning a DocumentLayout.
Trait Implementations§
Source§impl From<DocumentLayout> for Builder<Complete>
impl From<DocumentLayout> for Builder<Complete>
Source§fn from(v: DocumentLayout) -> Self
fn from(v: DocumentLayout) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<T> Freeze for Builder<T>where
T: Freeze,
impl<T> RefUnwindSafe for Builder<T>where
T: RefUnwindSafe,
impl<T> Send for Builder<T>where
T: Send,
impl<T> Sync for Builder<T>where
T: Sync,
impl<T> Unpin for Builder<T>where
T: Unpin,
impl<T> UnsafeUnpin for Builder<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Builder<T>where
T: UnwindSafe,
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