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> { /* private fields */ }

Implementations§

Source§

impl<'a, R, V> KpType<'a, R, V>
where 'a: 'static,

Source

pub fn to_dynamic(self) -> KpDynamic<R, V>

Converts this keypath (KpType) to KpDynamic for dynamic dispatch and storage. Requires 'a: 'static so the boxed getter/setter closures can be 'static.