#[non_exhaustive]pub struct ExitReport {
pub state: ExitState,
pub sink_drain: Option<DrainReport>,
pub final_watermarks: Vec<(PartitionId, i64)>,
}Expand description
Outcome of PipelineRuntime::run.
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.state: ExitStateHow the run ended.
sink_drain: Option<DrainReport>The sink’s drain report (absent when the sink drain hook could not run, e.g. the I/O runtime was already gone).
final_watermarks: Vec<(PartitionId, i64)>The last committed watermark per partition, as reported by the final commit.
Implementations§
Source§impl ExitReport
impl ExitReport
Sourcepub fn log(&self)
pub fn log(&self)
Log the outcome — state, sink drain, final watermarks — at the level
matching it (info for a clean exit, error for a failure).
Sourcepub fn exit_code(&self) -> i32
pub fn exit_code(&self) -> i32
The process exit code this outcome maps to: 0 for a clean exit,
1 for a failure.
Sourcepub fn ok(self) -> Result<ExitReport, FatalErrorReport>
pub fn ok(self) -> Result<ExitReport, FatalErrorReport>
The report as a Result, so a main can ? a failed run: a clean
exit passes the report through, a failure returns the
FatalErrorReport as the error.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExitReport
impl RefUnwindSafe for ExitReport
impl Send for ExitReport
impl Sync for ExitReport
impl Unpin for ExitReport
impl UnsafeUnpin for ExitReport
impl UnwindSafe for ExitReport
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
Casts
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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