Skip to main content

KpRoot

Type Alias KpRoot 

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

Kp will force dev to create get and set while taking full ownership of the Root while returning Root as value.

Aliased Type§

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

Fields§

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

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

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

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