pub struct Node {
pub index: usize,
pub node_type: NodeType,
pub begin_at: usize,
pub end_at: usize,
pub end_tag: Option<RefNode>,
pub prev: Option<Weak<RefCell<Node>>>,
pub parent: Option<Weak<RefCell<Node>>>,
pub root: Option<Weak<RefCell<Node>>>,
pub document: Option<Weak<RefCell<Doc>>>,
pub content: Option<Vec<char>>,
pub childs: Option<Vec<RefNode>>,
pub meta: Option<RefCell<TagMeta>>,
}
Expand description
Fields
index: usize
node_type: NodeType
begin_at: usize
end_at: usize
end_tag: Option<RefNode>
prev: Option<Weak<RefCell<Node>>>
parent: Option<Weak<RefCell<Node>>>
root: Option<Weak<RefCell<Node>>>
document: Option<Weak<RefCell<Doc>>>
content: Option<Vec<char>>
childs: Option<Vec<RefNode>>
meta: Option<RefCell<TagMeta>>
Implementations
sourceimpl Node
impl Node
pub fn new(node_type: NodeType, code_at: usize) -> Self
pub fn create_text_node(content: Vec<char>, code_at: Option<usize>) -> Self
pub fn build(&self, options: &RenderOptions, inner_text: bool) -> Vec<char>
pub fn is_document(&self) -> (bool, bool)
pub fn is_same(cur: &RefNode, other: &RefNode) -> bool
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Node
impl !Send for Node
impl !Sync for Node
impl Unpin for Node
impl !UnwindSafe for Node
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more