pub struct Optional<P>where
P: Pipe,{ /* private fields */ }
Expand description
A pipe that wraps another pipe’s IO in an Option
.
For more information, please see the documentation of the optional
method.
Implementations§
Trait Implementations§
Source§impl<P> Pipe for Optional<P>where
P: Pipe,
impl<P> Pipe for Optional<P>where
P: Pipe,
Source§type OutputItem = Option<<P as Pipe>::OutputItem>
type OutputItem = Option<<P as Pipe>::OutputItem>
The type of output this pipe produces.
Source§fn next(&mut self, item: Option<P::InputItem>) -> Option<P::OutputItem>
fn next(&mut self, item: Option<P::InputItem>) -> Option<P::OutputItem>
Calculate the next output item, based on an input item.
Source§fn connect<O: Pipe<InputItem = Self::OutputItem>>(
self,
other: O,
) -> Connector<Self, O>where
Self: Sized,
fn connect<O: Pipe<InputItem = Self::OutputItem>>(
self,
other: O,
) -> Connector<Self, O>where
Self: Sized,
Connect two pipes. Read more
Source§impl<P> ResetablePipe for Optional<P>where
P: ResetablePipe,
impl<P> ResetablePipe for Optional<P>where
P: ResetablePipe,
Auto Trait Implementations§
impl<P> Freeze for Optional<P>where
P: Freeze,
impl<P> RefUnwindSafe for Optional<P>where
P: RefUnwindSafe,
impl<P> Send for Optional<P>where
P: Send,
impl<P> Sync for Optional<P>where
P: Sync,
impl<P> Unpin for Optional<P>where
P: Unpin,
impl<P> UnwindSafe for Optional<P>where
P: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more