#[non_exhaustive]pub struct SinkCtx {
pub task: u32,
pub sink: u32,
pub emitted: Arc<Atomic<u64>>,
pub exactly_once: bool,
pub restore: Option<u64>,
pub acker: Arc<dyn Fn(u64) + Send + Sync>,
pub pipeline: String,
pub build_id: String,
}Expand description
What a sink is built with: its task id and its index sink within the output (the files it
names); the emitted counter; whether output is exactly-once (visibility gated on the epoch
commit); the checkpoint epoch a restored run continues from (None: a fresh run starts the
output over); the barrier Acker; and the run’s identity (a transactional id is pipeline +
the task). Built by the engine only (#[non_exhaustive]: new fields arrive as setters).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.task: u32§sink: u32§emitted: Arc<Atomic<u64>>§exactly_once: bool§restore: Option<u64>§acker: Arc<dyn Fn(u64) + Send + Sync>§pipeline: String§build_id: StringImplementations§
Source§impl SinkCtx
impl SinkCtx
pub fn new( task: u32, sink: u32, emitted: Arc<Atomic<u64>>, acker: Arc<dyn Fn(u64) + Send + Sync>, ) -> SinkCtx
pub fn exactly_once(self, exactly_once: bool) -> SinkCtx
pub fn restore(self, epoch: Option<u64>) -> SinkCtx
pub fn run(self, pipeline: &str, build_id: &str) -> SinkCtx
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SinkCtx
impl !UnwindSafe for SinkCtx
impl Freeze for SinkCtx
impl Send for SinkCtx
impl Sync for SinkCtx
impl Unpin for SinkCtx
impl UnsafeUnpin for SinkCtx
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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