pub struct SequentialWriter { /* private fields */ }Expand description
Writes data sequentially to an output stream from async data futures. Spawns async tasks to resolve futures and a background thread to perform blocking writes, allowing out-of-order future resolution with in-order writes.
Trait Implementations§
Source§impl DataWriter for SequentialWriter
impl DataWriter for SequentialWriter
Source§fn set_next_term_data_source<'life0, 'async_trait>(
&'life0 mut self,
byte_range: FileRange,
permit: Option<AdjustableSemaphorePermit>,
data_future: Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'static>>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_next_term_data_source<'life0, 'async_trait>(
&'life0 mut self,
byte_range: FileRange,
permit: Option<AdjustableSemaphorePermit>,
data_future: Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'static>>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sets the source for the next block of data; this is a future that can be executing in the background. This must be the next one sequentially, otherwise it will error out.
Auto Trait Implementations§
impl Freeze for SequentialWriter
impl RefUnwindSafe for SequentialWriter
impl Send for SequentialWriter
impl Sync for SequentialWriter
impl Unpin for SequentialWriter
impl UnsafeUnpin for SequentialWriter
impl UnwindSafe for SequentialWriter
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> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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