pub trait MapData<T, U>: Sized {
type MappedType;
// Required method
fn map_data<F>(self, f: F) -> Self::MappedType
where F: FnMut(T) -> U;
}Expand description
Transform user data type in an AST node
NOTE: Replaced by visitor-based approach in map_data_visitor module
Required Associated Types§
Sourcetype MappedType
type MappedType
The type with the new user data type
Required Methods§
Sourcefn map_data<F>(self, f: F) -> Self::MappedTypewhere
F: FnMut(T) -> U,
fn map_data<F>(self, f: F) -> Self::MappedTypewhere
F: FnMut(T) -> U,
Transform user data using the provided function
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.