#[non_exhaustive]pub struct PeeBuilder { /* private fields */ }Expand description
Implementations§
Source§impl PeeBuilder
impl PeeBuilder
Sourcepub fn new() -> Self
pub fn new() -> Self
Construct a new builder defaulting to zero sinks, Default compat,
capture(false), and ignore_write_errors(true).
Sourcepub fn sink(self, sink: Box<dyn Write + Send>) -> Self
pub fn sink(self, sink: Box<dyn Write + Send>) -> Self
Register a sink. Sinks receive the same bytes in registration order.
Sourcepub fn compat(self, compat: CompatibilityMode) -> Self
pub fn compat(self, compat: CompatibilityMode) -> Self
Set the compatibility mode.
Sourcepub fn capture(self, capture: bool) -> Self
pub fn capture(self, capture: bool) -> Self
Set capture-mode flag. Library no-op (sinks already capture by definition); retained for parity with the CLI flag and validated against Strict mode at build time.
Sourcepub fn ignore_write_errors(self, ignore: bool) -> Self
pub fn ignore_write_errors(self, ignore: bool) -> Self
Set the ignore-write-errors policy. Default: true (matches moreutils
--ignore-write-errors default-on behavior). When false, the first
sink write error halts the fan-out and is surfaced as
Error::SinkWriteFailed.
Trait Implementations§
Source§impl Debug for PeeBuilder
impl Debug for PeeBuilder
Auto Trait Implementations§
impl Freeze for PeeBuilder
impl !RefUnwindSafe for PeeBuilder
impl Send for PeeBuilder
impl !Sync for PeeBuilder
impl Unpin for PeeBuilder
impl UnsafeUnpin for PeeBuilder
impl !UnwindSafe for PeeBuilder
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