Skip to main content

CoercionTrait

Trait CoercionTrait 

Source
pub trait CoercionTrait<R, V, Root, Value, MutRoot, MutValue, G, S>
where Root: Borrow<R>, Value: Borrow<V>, MutRoot: BorrowMut<R>, MutValue: BorrowMut<V>, G: Fn(Root) -> Option<Value>, S: Fn(MutRoot) -> Option<MutValue>,
{ // Required methods fn for_arc<'b>( &self, ) -> Kp<Arc<R>, V, Arc<R>, Value, Arc<R>, MutValue, impl Fn(Arc<R>) -> Option<Value>, impl Fn(Arc<R>) -> Option<MutValue>> where R: 'b, V: 'b, Root: for<'a> From<&'a R>, MutRoot: for<'a> From<&'a mut R>; fn for_box<'a>( &self, ) -> Kp<Box<R>, V, Box<R>, Value, Box<R>, MutValue, impl Fn(Box<R>) -> Option<Value>, impl Fn(Box<R>) -> Option<MutValue>> where R: 'a, V: 'a, Root: for<'b> From<&'b R>, MutRoot: for<'b> From<&'b mut R>; fn into_set(self) -> impl Fn(MutRoot) -> Option<MutValue>; fn into_get(self) -> impl Fn(Root) -> Option<Value>; }

Required Methods§

Source

fn for_arc<'b>( &self, ) -> Kp<Arc<R>, V, Arc<R>, Value, Arc<R>, MutValue, impl Fn(Arc<R>) -> Option<Value>, impl Fn(Arc<R>) -> Option<MutValue>>
where R: 'b, V: 'b, Root: for<'a> From<&'a R>, MutRoot: for<'a> From<&'a mut R>,

Source

fn for_box<'a>( &self, ) -> Kp<Box<R>, V, Box<R>, Value, Box<R>, MutValue, impl Fn(Box<R>) -> Option<Value>, impl Fn(Box<R>) -> Option<MutValue>>
where R: 'a, V: 'a, Root: for<'b> From<&'b R>, MutRoot: for<'b> From<&'b mut R>,

Source

fn into_set(self) -> impl Fn(MutRoot) -> Option<MutValue>

set fn is converting fn pointer to Fn closure

Source

fn into_get(self) -> impl Fn(Root) -> Option<Value>

get fn is converting fn pointer to Fn closure

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<R, V, Root, Value, MutRoot, MutValue, G, S> CoercionTrait<R, V, Root, Value, MutRoot, MutValue, G, S> for Kp<R, V, Root, Value, MutRoot, MutValue, G, S>
where Root: Borrow<R>, Value: Borrow<V>, MutRoot: BorrowMut<R>, MutValue: BorrowMut<V>, G: Fn(Root) -> Option<Value>, S: Fn(MutRoot) -> Option<MutValue>,