Pipe0

Trait Pipe0 

Source
pub trait Pipe0: Sized + Pipe0Ref {
    // Provided method
    fn pipe0<R>(self, f: impl FnOnce(Self) -> R) -> impl FnOnce() -> R { ... }
}
Expand description

By-value arity-0 piping.

Moves self into the returned nullary closure.

Provided Methods§

Source

fn pipe0<R>(self, f: impl FnOnce(Self) -> R) -> impl FnOnce() -> R

Partially applies f by moving self into the returned nullary closure.

Law: self.pipe0(f)() = f(self).

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<T: Sized> Pipe0 for T