pub trait Pipe: Sized {
// Provided methods
async fn tap_async(self, func: impl AsyncFnOnce(&mut Self)) -> Self { ... }
fn tap(self, func: impl FnOnce(&mut Self)) -> Self { ... }
fn pipe<R: Sized>(self, func: impl FnOnce(Self) -> R) -> R { ... }
fn pipe_as<'a, T: 'a + ?Sized, R: 'a + Sized>(
&'a self,
func: impl FnOnce(&'a T) -> R,
) -> R
where Self: Deref<Target = T> { ... }
}Provided Methods§
async fn tap_async(self, func: impl AsyncFnOnce(&mut Self)) -> Self
fn tap(self, func: impl FnOnce(&mut Self)) -> Self
fn pipe<R: Sized>(self, func: impl FnOnce(Self) -> R) -> R
fn pipe_as<'a, T: 'a + ?Sized, R: 'a + Sized>(
&'a self,
func: impl FnOnce(&'a T) -> R,
) -> Rwhere
Self: Deref<Target = T>,
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.