pub struct StrDoc<L: LanguageExt> {
pub src: String,
pub lang: L,
pub tree: Tree,
}
Fields§
§src: String
§lang: L
§tree: Tree
Implementations§
Trait Implementations§
Source§impl<L: LanguageExt> Doc for StrDoc<L>
impl<L: LanguageExt> Doc for StrDoc<L>
type Source = String
type Lang = L
type Node<'r> = Node<'r>
fn get_lang(&self) -> &Self::Lang
fn get_source(&self) -> &Self::Source
fn do_edit(&mut self, edit: &Edit<Self::Source>) -> Result<(), String>
fn root_node(&self) -> Node<'_>
fn get_node_text<'a>(&'a self, node: &Self::Node<'a>) -> Cow<'a, str>
Source§impl<'t, L: LanguageExt> Traversal<'t, StrDoc<L>> for Post<'t, L>
impl<'t, L: LanguageExt> Traversal<'t, StrDoc<L>> for Post<'t, L>
Source§fn calibrate_for_match(&mut self, depth: Option<usize>)
fn calibrate_for_match(&mut self, depth: Option<usize>)
Calibrate cursor position to skip overlapping matches.
node depth will be passed if matched, otherwise None.
Source§fn get_current_depth(&self) -> usize
fn get_current_depth(&self) -> usize
Returns the current depth of cursor depth.
Cursor depth is incremented by 1 when moving from parent to child.
Cursor depth at Root node is 0.
Source§impl<'t, L: LanguageExt> Traversal<'t, StrDoc<L>> for Pre<'t, L>
impl<'t, L: LanguageExt> Traversal<'t, StrDoc<L>> for Pre<'t, L>
Source§fn calibrate_for_match(&mut self, depth: Option<usize>)
fn calibrate_for_match(&mut self, depth: Option<usize>)
Calibrate cursor position to skip overlapping matches.
node depth will be passed if matched, otherwise None.
Source§fn get_current_depth(&self) -> usize
fn get_current_depth(&self) -> usize
Returns the current depth of cursor depth.
Cursor depth is incremented by 1 when moving from parent to child.
Cursor depth at Root node is 0.
Auto Trait Implementations§
impl<L> Freeze for StrDoc<L>where
L: Freeze,
impl<L> RefUnwindSafe for StrDoc<L>where
L: RefUnwindSafe,
impl<L> Send for StrDoc<L>where
L: Send,
impl<L> Sync for StrDoc<L>where
L: Sync,
impl<L> Unpin for StrDoc<L>where
L: Unpin,
impl<L> UnwindSafe for StrDoc<L>where
L: UnwindSafe,
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