pub struct WriteCollectionOptions<H = fn(&SinkWriteError) -> SinkWriteErrorAction> { /* private fields */ }Expand description
Options for forwarding collected stream output into an async writer.
Use WriteCollectionOptions::fail_fast to stop on the first sink write failure,
WriteCollectionOptions::log_and_continue to preserve best-effort logging behavior, or
WriteCollectionOptions::with_error_handler to make a custom per-error decision.
Implementations§
Source§impl WriteCollectionOptions
impl WriteCollectionOptions
Sourcepub fn fail_fast() -> Self
pub fn fail_fast() -> Self
Creates writer collection options that fail on the first sink write error.
Sourcepub fn log_and_continue() -> Self
pub fn log_and_continue() -> Self
Creates writer collection options that log sink write errors and keep collecting.
Sourcepub fn with_error_handler<H>(handler: H) -> WriteCollectionOptions<H>
pub fn with_error_handler<H>(handler: H) -> WriteCollectionOptions<H>
Creates writer collection options with a custom sink write error handler.
Trait Implementations§
Source§impl<H: Clone> Clone for WriteCollectionOptions<H>
impl<H: Clone> Clone for WriteCollectionOptions<H>
Source§fn clone(&self) -> WriteCollectionOptions<H>
fn clone(&self) -> WriteCollectionOptions<H>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<H: Debug> Debug for WriteCollectionOptions<H>
impl<H: Debug> Debug for WriteCollectionOptions<H>
impl<H: Copy> Copy for WriteCollectionOptions<H>
Auto Trait Implementations§
impl<H> Freeze for WriteCollectionOptions<H>where
H: Freeze,
impl<H> RefUnwindSafe for WriteCollectionOptions<H>where
H: RefUnwindSafe,
impl<H> Send for WriteCollectionOptions<H>where
H: Send,
impl<H> Sync for WriteCollectionOptions<H>where
H: Sync,
impl<H> Unpin for WriteCollectionOptions<H>where
H: Unpin,
impl<H> UnsafeUnpin for WriteCollectionOptions<H>where
H: UnsafeUnpin,
impl<H> UnwindSafe for WriteCollectionOptions<H>where
H: 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