pub trait TransformExt<T>:
Transform<T>
+ Sized
+ 'static {
// Provided methods
fn then<U>(self, next: U) -> Chain<Self, U>
where U: Transform<Self::Output> { ... }
fn when<P>(self, predicate: P) -> Conditional<Self, P>
where P: Fn(&T) -> bool + Send + Sync { ... }
fn boxed(self) -> Box<dyn Transform<T, Output = Self::Output> + Send + Sync> { ... }
}Expand description
Extension trait for chainable transform operations
Provided Methods§
Sourcefn then<U>(self, next: U) -> Chain<Self, U>
fn then<U>(self, next: U) -> Chain<Self, U>
Chain this transform with another
Creates a new transform that applies this transform first, then the next.
Sourcefn when<P>(self, predicate: P) -> Conditional<Self, P>
fn when<P>(self, predicate: P) -> Conditional<Self, P>
Apply this transform conditionally based on a predicate
The transform is only applied if the predicate returns true for the input.
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.