Skip to main content

KpBox

Type Alias KpBox 

Source
pub type KpBox<'a, R, V> = Kp<R, V, &'a R, &'a V, &'a mut R, &'a mut V, Box<dyn Fn(&'a R) -> Option<&'a V> + 'a>, Box<dyn Fn(&'a mut R) -> Option<&'a mut V> + 'a>>;

Aliased Type§

pub struct KpBox<'a, R, V> {
    pub get: Box<dyn Fn(&'a R) -> Option<&'a V> + 'a>,
    pub set: Box<dyn Fn(&'a mut R) -> Option<&'a mut V> + 'a>,
    /* private fields */
}

Fields§

§get: Box<dyn Fn(&'a R) -> Option<&'a V> + 'a>

Getter closure: used by Kp::get for read-only access.

§set: Box<dyn Fn(&'a mut R) -> Option<&'a mut V> + 'a>

Setter closure: used by Kp::get_mut for mutation.