pub trait Transformable<'ast>where
Self: Sized,{
// Required method
fn apply_transform_with_path<T>(
&'ast self,
transform: &mut T,
node_path: &mut NodePath<'ast>,
) -> Result<Self, T::Error>
where T: Transform<'ast>;
// Provided method
fn apply_transform<T>(
&'ast self,
transform: &mut T,
) -> Result<Self, T::Error>
where T: Transform<'ast> { ... }
}Expand description
Trait for applying a Transform to an AST to produce an edited version.
Implementations are provided for all AST node types in sqltk-parser.
Required Methods§
Sourcefn apply_transform_with_path<T>(
&'ast self,
transform: &mut T,
node_path: &mut NodePath<'ast>,
) -> Result<Self, T::Error>where
T: Transform<'ast>,
fn apply_transform_with_path<T>(
&'ast self,
transform: &mut T,
node_path: &mut NodePath<'ast>,
) -> Result<Self, T::Error>where
T: Transform<'ast>,
Recursively applies transform to self returning Ok(Self) when
successful or Err(T::Error) if unsuccessful.
The transform is applied depth-first before finally being applied to
self.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.