pub struct RtfNode {
pub kind: RtfNodeKind,
pub parent: Option<NodeId>,
pub children: Vec<NodeId>,
pub attr_start: NodeId,
pub attr_end: NodeId,
pub ns_start: NodeId,
pub ns_end: NodeId,
}Expand description
One node inside an RtfIndex. Strings are owned (boxed) so
the index can stand alone after the source crate::xpath::eval
result-tree fragment has been built — XSLT bind_variable
constructs the index then drops the intermediate.
All NodeId fields (parent, children, attribute /
namespace ranges) are stored already encoded with the RTF
marker bits (via encode_rtf_id), so accessor methods
can hand out &[NodeId] slices directly. This costs the
builder one bit-shift per id at construction time and saves
the evaluator a per-access Vec allocation.
Fields§
§kind: RtfNodeKind§parent: Option<NodeId>§children: Vec<NodeId>§attr_start: NodeId§attr_end: NodeId§ns_start: NodeId§ns_end: NodeIdTrait Implementations§
Auto Trait Implementations§
impl Freeze for RtfNode
impl RefUnwindSafe for RtfNode
impl Send for RtfNode
impl Sync for RtfNode
impl Unpin for RtfNode
impl UnsafeUnpin for RtfNode
impl UnwindSafe for RtfNode
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