Skip to main content

MapDispatch

Trait MapDispatch 

Source
pub trait MapDispatch: Sized {
    // Required method
    fn dispatch_map(
        &mut self,
        value: &MapValue,
        def_region_kind: DefRegionKind,
    ) -> Option<MapResult>;
}
Expand description

Ordered typed replacement dispatch for structural_map.

None means no handler matched and preserves the current value. A generated #[dispatch(map)] implementation tests map_* methods in source order and returns the first match.

Required Methods§

Source

fn dispatch_map( &mut self, value: &MapValue, def_region_kind: DefRegionKind, ) -> Option<MapResult>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<V: MapDispatch> MapDispatch for &mut V

Source§

fn dispatch_map( &mut self, value: &MapValue, def_region_kind: DefRegionKind, ) -> Option<MapResult>

Implementors§