pub struct TsParser { /* private fields */ }Implementations§
Source§impl TsParser
impl TsParser
pub fn new(text: &mut Text, path: impl AsRef<Path>) -> Option<Self>
pub fn lang(&self) -> &'static str
Sourcepub fn indent_on(
&self,
text: &mut Text,
p: Point,
cfg: PrintCfg,
) -> Option<usize>
pub fn indent_on( &self, text: &mut Text, p: Point, cfg: PrintCfg, ) -> Option<usize>
Returns the indentation difference from the previous line
pub fn parse_with<T: AsRef<[u8]>, F: FnMut(usize, Point) -> T>( &mut self, callback: &mut F, old_tree: Option<&Tree>, ) -> Option<Tree>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TsParser
impl RefUnwindSafe for TsParser
impl Send for TsParser
impl Sync for TsParser
impl Unpin for TsParser
impl UnwindSafe for TsParser
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