Trait swc_plugin::utils::swc_common::util::take::Take
source · [−]pub trait Take {
fn dummy() -> Self;
fn take(&mut self) -> Self { ... }
fn map_with_mut<F>(&mut self, op: F)
where
F: FnOnce(Self) -> Self,
{ ... }
}
Expand description
Helper for people who are working on VisitMut
.
This trait is implemented for ast nodes. If not and you need it, please file an issue.
Required Methods
Provided Methods
fn map_with_mut<F>(&mut self, op: F) where
F: FnOnce(Self) -> Self,
fn map_with_mut<F>(&mut self, op: F) where
F: FnOnce(Self) -> Self,
Mutate self
using op
, which accepts owned data.