aoclib::geometry::map

Trait ContextInto

source
pub trait ContextInto<T> {
    type Context;

    // Required method
    fn ctx_into(self, position: Point, context: &Self::Context) -> T;
}
Expand description

Safe fast value-to-value conversion which consumes the input value and references some context.

This differs from Into in that it requires a context. Also, because of a blanket implementation, it cannot be manually implemented for a given T for any type which also implements Into<T>.

Required Associated Types§

Required Methods§

source

fn ctx_into(self, position: Point, context: &Self::Context) -> T

Implementors§

source§

impl<A, B> ContextInto<B> for A
where B: ContextFrom<A>,