pub struct Chunk {
pub sequence_number: u64,
pub snapshot: bool,
pub processed_steps: Option<Step>,
pub bin_data: Option<Vec<u8>>,
pub text_data: Option<String>,
pub json_data: Option<Value>,
}Expand description
A set of updates to a SQL table or view.
The sequence_number field stores the offset of the chunk relative to the
start of the stream and can be used to implement reliable delivery.
The payload is stored in the bin_data, text_data, or json_data field
depending on the data format used. A chunk without a payload marks the
end of a step’s output, when it carries processed_steps, or is a
keep-alive.
Fields§
§sequence_number: u64§snapshot: booltrue when this chunk is part of the initial snapshot delivered in
send_snapshot mode; false for incremental delta updates.
processed_steps: Option<Step>The number of steps whose output precedes this chunk, this step
included. Some only on the empty chunk that follows a step’s output,
so a chunk with processed_steps carries no bin_data, text_data
or json_data. The output of a record that the pipeline ingested in
step n has been delivered once processed_steps > n. The
/completion_status endpoint reports the step that a completion
token waits for in the same unit, so a client that has received a
chunk with processed_steps at or above that step is guaranteed to
have received every update for the token.
bin_data: Option<Vec<u8>>Base64 encoded binary payload, e.g., bincode.
text_data: Option<String>Text payload, e.g., CSV.
json_data: Option<Value>JSON payload.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Chunk
impl<'de> Deserialize<'de> for Chunk
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Forget for Chunk
impl Freeze for Chunk
impl RefUnwindSafe for Chunk
impl Send for Chunk
impl Sync for Chunk
impl Unpin for Chunk
impl UnsafeUnpin for Chunk
impl UnwindSafe for Chunk
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
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> ⓘ
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