pub struct NodeBuilder { /* private fields */ }Expand description
Builder for constructing new nodes to pass to commands.
Implementations§
Source§impl NodeBuilder
impl NodeBuilder
pub fn new(node_type: MdastNodeType) -> Self
Sourcepub fn children(self, children: impl IntoIterator<Item = NewNode>) -> Self
pub fn children(self, children: impl IntoIterator<Item = NewNode>) -> Self
Add multiple children
Sourcepub fn data_bytes(self, bytes: Vec<u8>) -> Self
pub fn data_bytes(self, bytes: Vec<u8>) -> Self
Set raw type-data bytes (use codec encode_* functions)
Source§impl NodeBuilder
Convenience constructors
impl NodeBuilder
Convenience constructors
Auto Trait Implementations§
impl Freeze for NodeBuilder
impl RefUnwindSafe for NodeBuilder
impl Send for NodeBuilder
impl Sync for NodeBuilder
impl Unpin for NodeBuilder
impl UnsafeUnpin for NodeBuilder
impl UnwindSafe for NodeBuilder
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