pub struct Transition {Show 18 fields
pub to_state: CreditRegistrationState,
pub error_code: Option<CreditRegistrationErrorCode>,
pub error_message: Option<String>,
pub needs_admin_attention: Option<AdminAttention>,
pub event_kind: CreditRegistrationEventKind,
pub event_message: Option<String>,
pub actor_user_id: Option<Uuid>,
pub suotar_api_call_id: Option<Uuid>,
pub suotar_endpoint: Option<SuotarEndpoint>,
pub suotar_requested_at: Option<DateTime<Utc>>,
pub suotar_answered_at: Option<DateTime<Utc>>,
pub suotar_answer: Option<SuotarAnswer>,
pub event_details: Option<Value>,
pub request_item_id: Option<String>,
pub expected_from_state: Option<CreditRegistrationState>,
pub policy: TransitionPolicy,
pub next_attempt_at: Option<DateTime<Utc>>,
pub keeps_enrolment_checked_at: bool,
}Fields§
§to_state: CreditRegistrationState§error_code: Option<CreditRegistrationErrorCode>§error_message: Option<String>Scrub before passing: this is persisted.
needs_admin_attention: Option<AdminAttention>None leaves the flag as it was.
event_kind: CreditRegistrationEventKind§event_message: Option<String>§actor_user_id: Option<Uuid>§suotar_api_call_id: Option<Uuid>§suotar_endpoint: Option<SuotarEndpoint>§suotar_requested_at: Option<DateTime<Utc>>§suotar_answered_at: Option<DateTime<Utc>>§suotar_answer: Option<SuotarAnswer>§event_details: Option<Value>Already scrubbed {request, response} payload for the event row.
request_item_id: Option<String>The requestItemId the row went out under in the call behind this move.
expected_from_state: Option<CreditRegistrationState>Set by a caller that computed to_state from a row snapshot taken before an await (an
external call, or a gap before its own transaction) during which some other writer could
have moved the row on. None skips the check, for callers writing from a snapshot taken
under the same transaction’s lock.
policy: TransitionPolicyWhich (from → to) edges this write may take; see TransitionPolicy.
next_attempt_at: Option<DateTime<Utc>>When the pipeline may claim the row next. None takes the target state’s default cadence,
which is what keeps a caller that forgets from leaving the row spinning.
keeps_enrolment_checked_at: boolLeaves enrolment_checked_at alone on a move that would stamp it: a lookup that failed in
transit, or only found the Sisu person, did not check the enrolment.
Implementations§
Source§impl Transition
impl Transition
pub fn to(to_state: CreditRegistrationState) -> Self
Sourcepub fn by_hand(to_state: CreditRegistrationState) -> Self
pub fn by_hand(to_state: CreditRegistrationState) -> Self
A move a human asked for, which may also take the ADMIN_ONLY_TARGETS edges.
Sourcepub fn planted(to_state: CreditRegistrationState) -> Self
pub fn planted(to_state: CreditRegistrationState) -> Self
A fixture planting a row in a state directly; see TransitionPolicy::Planted.
Trait Implementations§
Source§impl Clone for Transition
impl Clone for Transition
Source§fn clone(&self) -> Transition
fn clone(&self) -> Transition
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Transition
impl Debug for Transition
Source§impl PartialEq for Transition
impl PartialEq for Transition
impl StructuralPartialEq for Transition
Auto Trait Implementations§
impl Freeze for Transition
impl RefUnwindSafe for Transition
impl Send for Transition
impl Sync for Transition
impl Unpin for Transition
impl UnsafeUnpin for Transition
impl UnwindSafe for Transition
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].