pub struct CopyingSource<S: Source, U: Sink> { /* private fields */ }
Expand description
A source that also copies each read element to the sink
Warning: if a call to write
fails, this source will return an error and the element that has
been read from the underlying source will be lost
Implementations§
Trait Implementations§
Source§impl<S: Source, U: Sink> Source for CopyingSource<S, U>
impl<S: Source, U: Sink> Source for CopyingSource<S, U>
Source§fn counting_source(self, ctr: &mut usize) -> CountingSource<'_, Self>
fn counting_source(self, ctr: &mut usize) -> CountingSource<'_, Self>
Creates a counting source
Source§fn copying_source<U: Sink>(self, sink: U) -> CopyingSource<Self, U>
fn copying_source<U: Sink>(self, sink: U) -> CopyingSource<Self, U>
Creates a copying source
Auto Trait Implementations§
impl<S, U> Freeze for CopyingSource<S, U>
impl<S, U> RefUnwindSafe for CopyingSource<S, U>where
S: RefUnwindSafe,
U: RefUnwindSafe,
impl<S, U> Send for CopyingSource<S, U>
impl<S, U> Sync for CopyingSource<S, U>
impl<S, U> Unpin for CopyingSource<S, U>
impl<S, U> UnwindSafe for CopyingSource<S, U>where
S: UnwindSafe,
U: 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