Skip to main content

KpOwned

Type Alias KpOwned 

Source
pub type KpOwned<R, V> = Kp<R, V, R, V, R, V, fn(R) -> Option<V>, fn(R) -> Option<V>>;
Expand description

Kp will force dev to create get and set while root and value both will be owned

Aliased Type§

pub struct KpOwned<R, V> {
    pub get: fn(R) -> Option<V>,
    pub set: fn(R) -> Option<V>,
    /* private fields */
}

Fields§

§get: fn(R) -> Option<V>

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

§set: fn(R) -> Option<V>

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