pub struct NodeSegment {
pub segment_type: SegmentType,
pub children: Vec<Segment>,
pub span: Span,
}Expand description
A branch segment grouping children under a named production.
Fields§
§segment_type: SegmentType§children: Vec<Segment>§span: SpanImplementations§
Source§impl NodeSegment
impl NodeSegment
Sourcepub fn new(segment_type: SegmentType, children: Vec<Segment>) -> Self
pub fn new(segment_type: SegmentType, children: Vec<Segment>) -> Self
Create a new node from children, computing span automatically.
Trait Implementations§
Source§impl Clone for NodeSegment
impl Clone for NodeSegment
Source§fn clone(&self) -> NodeSegment
fn clone(&self) -> NodeSegment
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 moreAuto Trait Implementations§
impl Freeze for NodeSegment
impl RefUnwindSafe for NodeSegment
impl Send for NodeSegment
impl Sync for NodeSegment
impl Unpin for NodeSegment
impl UnsafeUnpin for NodeSegment
impl UnwindSafe for NodeSegment
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