pub struct Transformer<'a, M: NodeMetadata, N: NodeWithMetadata<M>, F: TransformerFeatures<M, N>> { /* private fields */ }Implementations§
Source§impl<'a, M: NodeMetadata, N: NodeWithMetadata<M>, F: TransformerFeatures<M, N>> Transformer<'a, M, N, F>
impl<'a, M: NodeMetadata, N: NodeWithMetadata<M>, F: TransformerFeatures<M, N>> Transformer<'a, M, N, F>
pub fn new_in( bump: &'a Bump, features: F, atoms: &'static dyn DynAtomSet, source_text: &'a str, ) -> Self
pub fn transform(&mut self, node: &mut N)
pub fn has_changed(&self) -> bool
pub fn bump(&self) -> &'a Bump
pub fn to_source_cursor(&self, cursor: Cursor) -> SourceCursor<'a>
pub fn to_source_cursors( &self, parsed: &impl ToCursors, ) -> Vec<'a, SourceCursor<'a>>
pub fn to_atom<A: AtomSet + PartialEq>(&self, c: Cursor) -> A
pub fn overlays(&self) -> Ref<'_, CursorOverlaySet<'a>>
pub fn parse_value<T>(&self, source: &'a str) -> Vec<'a, SourceCursor<'a>>
pub fn reset(&self)
pub fn has_replacement(&self, span: impl ToSpan) -> bool
pub fn clear_pending_edits(&self, span: Span) -> bool
pub fn replace(&self, span: impl ToSpan, cursors: Vec<'a, SourceCursor<'a>>)
pub fn delete(&self, span: impl ToSpan)
pub fn insert_before( &self, anchor: SourceOffset, cursors: Vec<'a, SourceCursor<'a>>, )
pub fn insert_after( &self, anchor: SourceOffset, cursors: Vec<'a, SourceCursor<'a>>, )
pub fn replace_parsed<T>(&self, span: impl ToSpan, css: &str)
pub fn commit_overlays(&self) -> Result<(), CommitError>
Auto Trait Implementations§
impl<'a, M, N, F> !Freeze for Transformer<'a, M, N, F>
impl<'a, M, N, F> !RefUnwindSafe for Transformer<'a, M, N, F>
impl<'a, M, N, F> !Send for Transformer<'a, M, N, F>
impl<'a, M, N, F> !Sync for Transformer<'a, M, N, F>
impl<'a, M, N, F> Unpin for Transformer<'a, M, N, F>
impl<'a, M, N, F> !UnwindSafe for Transformer<'a, M, N, F>
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