pub struct SequenceWriter { /* private fields */ }Expand description
Utility struct to associate SequenceId’s with chunks in an array stream. It wraps a SegmentWriter and enforces SegmentId’s sent to it are monotonically increasing. See SequenceId docs for more information.
Implementations§
Source§impl SequenceWriter
impl SequenceWriter
pub fn new(segment_writer: Box<dyn SegmentWriter>) -> Self
Sourcepub async fn put(
&self,
sequence_id: SequenceId,
buffer: Vec<ByteBuffer>,
) -> VortexResult<SegmentId>
pub async fn put( &self, sequence_id: SequenceId, buffer: Vec<ByteBuffer>, ) -> VortexResult<SegmentId>
Wait until the given SequenceId is the first non dropped instance among all that self::new_sequential is created. Calls SegmentWriter::put with the resulting SegmentId. See SequenceId::collapse docs for more information.
Sourcepub fn new_sequential(
&self,
stream: SendableArrayStream,
) -> SendableSequentialStream
pub fn new_sequential( &self, stream: SendableArrayStream, ) -> SendableSequentialStream
Annotate an array stream with sequence identifiers.
Each sequence id on an item in the stream would come after all others that come before it.
Consecutive calls would guarantee that all sequence id’s associated on the latter stream would come after all that were associated with the former stream.
Trait Implementations§
Source§impl Clone for SequenceWriter
impl Clone for SequenceWriter
Source§fn clone(&self) -> SequenceWriter
fn clone(&self) -> SequenceWriter
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 moreAuto Trait Implementations§
impl Freeze for SequenceWriter
impl !RefUnwindSafe for SequenceWriter
impl Send for SequenceWriter
impl Sync for SequenceWriter
impl Unpin for SequenceWriter
impl !UnwindSafe for SequenceWriter
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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