pub struct BoxedWriter<I>(/* private fields */);Expand description
A writer of any concrete type, behind one dynamic dispatch.
Implementations§
Source§impl<I> BoxedWriter<I>
impl<I> BoxedWriter<I>
Sourcepub fn new<W: ItemWriter<I> + 'static>(writer: W) -> Self
pub fn new<W: ItemWriter<I> + 'static>(writer: W) -> Self
Erases a concrete writer.
Trait Implementations§
Source§impl<I> ItemWriter<I> for BoxedWriter<I>
impl<I> ItemWriter<I> for BoxedWriter<I>
Source§fn write<'a>(
&'a self,
items: &'a [I],
context: WriteContext<'a>,
) -> impl Future<Output = Result<WriteOutcome, WriterError>> + Send + 'a
fn write<'a>( &'a self, items: &'a [I], context: WriteContext<'a>, ) -> impl Future<Output = Result<WriteOutcome, WriterError>> + Send + 'a
Writes one borrowed, nonempty batch. Read more
Auto Trait Implementations§
impl<I> !RefUnwindSafe for BoxedWriter<I>
impl<I> !UnwindSafe for BoxedWriter<I>
impl<I> Freeze for BoxedWriter<I>
impl<I> Send for BoxedWriter<I>
impl<I> Sync for BoxedWriter<I>
impl<I> Unpin for BoxedWriter<I>
impl<I> UnsafeUnpin for BoxedWriter<I>where
Box<dyn WriterObject<I>>: UnsafeUnpin,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more