Trait StmtLikeInjector
pub trait StmtLikeInjector<S>where
S: StmtLike,{
// Required methods
fn prepend_stmt(&mut self, insert_with: S);
fn prepend_stmts<I>(&mut self, insert_with: I)
where I: IntoIterator<Item = S>;
}Available on crate features
__ecma and __utils only.Expand description
Prepends statements after directive statements.
Required Methods§
fn prepend_stmt(&mut self, insert_with: S)
fn prepend_stmts<I>(&mut self, insert_with: I)where
I: IntoIterator<Item = S>,
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.
Implementations on Foreign Types§
§impl<S> StmtLikeInjector<S> for Vec<S>where
S: StmtLike,
impl<S> StmtLikeInjector<S> for Vec<S>where
S: StmtLike,
§fn prepend_stmt(&mut self, insert_with: S)
fn prepend_stmt(&mut self, insert_with: S)
Note: If there is no directive, use insert instead.
§fn prepend_stmts<I>(&mut self, insert_with: I)where
I: IntoIterator<Item = S>,
fn prepend_stmts<I>(&mut self, insert_with: I)where
I: IntoIterator<Item = S>,
Note: If there is no directive, use splice instead.