Struct TextNode
#[non_exhaustive]pub struct TextNode {
pub parent: Option<u32>,
pub relation: TextRelation,
pub content: TextNodeContent,
pub style: TextNodeStyle,
pub metadata: Tag,
}Expand description
One typed shallow component and its position in the tree.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.parent: Option<u32>Parent node index, or None for the root.
relation: TextRelationRelation to the parent.
content: TextNodeContentContents without recursive component slots.
style: TextNodeStyleStyle without recursive component slots.
metadata: TagUnknown component fields, as a compound.
Implementations§
§impl TextNode
impl TextNode
pub fn new(content: TextNodeContent) -> TextNode
pub fn new(content: TextNodeContent) -> TextNode
A root row with no style overrides or unknown fields.
Trait Implementations§
impl Eq for TextNode
impl StructuralPartialEq for TextNode
Auto Trait Implementations§
impl Freeze for TextNode
impl RefUnwindSafe for TextNode
impl Send for TextNode
impl Sync for TextNode
impl Unpin for TextNode
impl UnsafeUnpin for TextNode
impl UnwindSafe for TextNode
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