pub trait ToNestWith<N, T>: Sizedwhere
T: TransformToNest<Self, N>,{
// Provided method
fn to_nest_with(&self, transform: &T) -> N { ... }
}Expand description
Not intended for external implementation.
Users should instead implement TransformToNest. This trait is interoperable and can be implemented on any struct, not just Data structs. This allows for dependency injection and/or state management.
ToNestWith will be implemented automatically when TransformToNest is implemented on the corresponding types.
Provided Methods§
fn to_nest_with(&self, transform: &T) -> N
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§
impl<D, N, T> ToNestWith<N, T> for Dwhere
T: TransformToNest<D, N>,
Blanket implementation providing to_nest_with(transform) for data structs that have a corresponding transform impl (impl TransformToNest<Data, Nest> for MyTransform)