pub struct FormatElement { /* private fields */ }
Expand description
A formattable element.
Implementations§
Source§impl FormatElement
impl FormatElement
Sourcepub fn new(
element: Element,
children: Option<NonEmpty<Box<FormatElement>>>,
) -> Self
pub fn new( element: Element, children: Option<NonEmpty<Box<FormatElement>>>, ) -> Self
Creates a new FormatElement
.
Sourcepub fn children(
&self,
) -> Option<AssertConsumedIter<impl Iterator<Item = &FormatElement>>>
pub fn children( &self, ) -> Option<AssertConsumedIter<impl Iterator<Item = &FormatElement>>>
Gets the children for this node.
Trait Implementations§
Source§impl Clone for FormatElement
impl Clone for FormatElement
Source§fn clone(&self) -> FormatElement
fn clone(&self) -> FormatElement
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for FormatElement
impl Debug for FormatElement
Source§impl Writable for &FormatElement
impl Writable for &FormatElement
Source§fn write(&self, stream: &mut TokenStream<PreToken>)
fn write(&self, stream: &mut TokenStream<PreToken>)
Writes the element to the token stream.
Auto Trait Implementations§
impl Freeze for FormatElement
impl !RefUnwindSafe for FormatElement
impl !Send for FormatElement
impl !Sync for FormatElement
impl Unpin for FormatElement
impl !UnwindSafe for FormatElement
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