pub struct StructuralNode {
pub id: NodeId,
pub file_id: u64,
pub kind: NodeKind,
pub label: String,
pub path: Vec<String>,
pub byte_range: (usize, usize),
pub line_range: (u32, u32),
pub parent: Option<NodeId>,
pub depth: u32,
}Expand description
A structural node extracted from a non-code file (markdown, JSON, YAML, TOML, CSV).
Fields§
§id: NodeId§file_id: u64§kind: NodeKind§label: String§path: Vec<String>§byte_range: (usize, usize)Half-open [start, end) byte range in the source text.
line_range: (u32, u32)1-based (first_line, last_line) inclusive.
parent: Option<NodeId>§depth: u32Implementations§
Trait Implementations§
Source§impl Clone for StructuralNode
impl Clone for StructuralNode
Source§fn clone(&self) -> StructuralNode
fn clone(&self) -> StructuralNode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 StructuralNode
impl Debug for StructuralNode
Source§impl<'de> Deserialize<'de> for StructuralNode
impl<'de> Deserialize<'de> for StructuralNode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for StructuralNode
impl RefUnwindSafe for StructuralNode
impl Send for StructuralNode
impl Sync for StructuralNode
impl Unpin for StructuralNode
impl UnsafeUnpin for StructuralNode
impl UnwindSafe for StructuralNode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more