Skip to main content

CoercionTrait

Trait CoercionTrait 

Source
pub trait CoercionTrait<R, V, Root, Value, MutRoot, MutValue, G, S>: KpTrait<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>,
{ // Provided 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> { ... } }

Provided 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>,

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>,