pub struct StreamSink(/* private fields */);Implementations§
Source§impl StreamSink
impl StreamSink
pub fn new(writer: impl Write + 'static) -> Self
pub fn process_stdout() -> Self
Sourcepub fn redirect(&self, writer: impl Write + 'static)
pub fn redirect(&self, writer: impl Write + 'static)
Replace the destination; every clone of this sink follows.
Sourcepub fn with_writer<R>(&self, write: impl FnOnce(&mut dyn Write) -> R) -> R
pub fn with_writer<R>(&self, write: impl FnOnce(&mut dyn Write) -> R) -> R
For the bytes that follow the handler’s entries on the same stream.
Trait Implementations§
Source§impl Clone for StreamSink
impl Clone for StreamSink
Source§fn clone(&self) -> StreamSink
fn clone(&self) -> StreamSink
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for StreamSink
impl !Send for StreamSink
impl !Sync for StreamSink
impl !UnwindSafe for StreamSink
impl Freeze for StreamSink
impl Unpin for StreamSink
impl UnsafeUnpin for StreamSink
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