Skip to main content

CodeMap

Trait CodeMap 

Source
pub trait CodeMap<In: Copy, Out: Copy>: Send + Sync {
    // Required method
    fn map(&self, code: In) -> Out;
}
Expand description

A total map from one code space to another.

This is the first half of the upstream transcode_decode composite: the part that is a relabelling rather than a decode.

Required Methods§

Source

fn map(&self, code: In) -> Out

Relabel. Total on the whole input code space.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<In: Copy, Out: Copy, F> CodeMap<In, Out> for F
where F: Fn(In) -> Out + Send + Sync,