pub struct Outcome {
pub to_state: CreditRegistrationState,
pub error_code: Option<CreditRegistrationErrorCode>,
pub needs_admin_attention: Option<AdminAttention>,
pub next: NextAttempt,
pub drop_verified_student_number: bool,
pub increment_submit_retry_count: bool,
pub keeps_enrolment_checked_at: bool,
}Expand description
What the phase writes for this row.
Fields§
§to_state: CreditRegistrationState§error_code: Option<CreditRegistrationErrorCode>§needs_admin_attention: Option<AdminAttention>None leaves the flag as it was, so a retry keeps an operator’s earlier verdict.
next: NextAttempt§drop_verified_student_number: boolSet when Suotar says the stored number names nobody, so it is wrong wherever we hold it.
increment_submit_retry_count: bool§keeps_enrolment_checked_at: boolA lookup that failed in transit, or only found the Sisu person: it was no check, so the row’s last check time stands.
Implementations§
Source§impl Outcome
impl Outcome
pub fn to(to_state: CreditRegistrationState) -> Self
Sourcepub fn is_failure(&self) -> bool
pub fn is_failure(&self) -> bool
Whether the row counts against the iteration’s items_failed: an error code that is no
waiting answer, so a verify poll that is still waiting is not one. Not the same question as
CreditRegistrationState::is_failed_state.
Sourcepub fn is_waiting(&self) -> bool
pub fn is_waiting(&self) -> bool
Whether the row only awaits something outside the pipeline, such as the student’s enrolment: counted apart from failures.
Sourcepub fn transition(
&self,
expected_from_state: Option<CreditRegistrationState>,
now: DateTime<Utc>,
) -> Transition
pub fn transition( &self, expected_from_state: Option<CreditRegistrationState>, now: DateTime<Utc>, ) -> Transition
The ledger write this outcome asks for, without the audit fields of the exchange behind it.
expected_from_state is as Transition::expected_from_state; a backoff counts from now.
pub(super) fn with_code(self, error_code: CreditRegistrationErrorCode) -> Self
pub(super) fn needing_admin(self) -> Self
fn after(self, delay: TimeDelta) -> Self
Trait Implementations§
impl StructuralPartialEq for Outcome
Auto Trait Implementations§
impl Freeze for Outcome
impl RefUnwindSafe for Outcome
impl Send for Outcome
impl Sync for Outcome
impl Unpin for Outcome
impl UnsafeUnpin for Outcome
impl UnwindSafe for Outcome
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].