Skip to main content

KpType

Type Alias KpType 

Source
pub type KpType<'a, R, V> = Kp<R, V, &'a R, &'a V, &'a mut R, &'a mut V, for<'b> fn(&'b R) -> Option<&'b V>, for<'b> fn(&'b mut R) -> Option<&'b mut V>>;

Aliased Type§

pub struct KpType<'a, R, V> {
    pub get: for<'b> fn(&'b R) -> Option<&'b V>,
    pub set: for<'b> fn(&'b mut R) -> Option<&'b mut V>,
    /* private fields */
}

Fields§

§get: for<'b> fn(&'b R) -> Option<&'b V>

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

§set: for<'b> fn(&'b mut R) -> Option<&'b mut V>

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