pub struct CabalCst {
pub source: String,
pub nodes: Vec<CstNode>,
pub root: NodeId,
}Expand description
Fields§
§source: StringThe original source text (owned).
nodes: Vec<CstNode>Flat arena of all CST nodes.
root: NodeIdIndex of the root node (always NodeId(0)).
Implementations§
Source§impl CabalCst
impl CabalCst
Sourcepub fn render(&self) -> String
pub fn render(&self) -> String
Render the CST back to text. When no edits have been made, this must produce byte-identical output to the original source.
Sourcepub fn node_count(&self) -> usize
pub fn node_count(&self) -> usize
Number of nodes in the arena.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CabalCst
impl RefUnwindSafe for CabalCst
impl Send for CabalCst
impl Sync for CabalCst
impl Unpin for CabalCst
impl UnsafeUnpin for CabalCst
impl UnwindSafe for CabalCst
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