MapData

Trait MapData 

Source
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§

Source

type MappedType

The type with the new user data type

Required Methods§

Source

fn map_data<F>(self, f: F) -> Self::MappedType
where 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.

Implementors§