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>,
    pub _p: PhantomData<(R, R, R, R, R, R)>,
}

Fields§

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

Getter closure: used by Kp::get for read-only access when G satisfies the HRTB.

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

Setter closure: used by Kp::get_mut for mutation when S satisfies the HRTB.

§_p: PhantomData<(R, R, R, R, R, R)>