pub struct ResubmissionFacts {
pub state: CreditRegistrationState,
pub is_superseded: bool,
pub error_code: Option<CreditRegistrationErrorCode>,
pub resubmit_not_before: Option<DateTime<Utc>>,
pub submitted_at: Option<DateTime<Utc>>,
}Expand description
What decides whether a row may be moved by hand, read off whichever row type the caller has.
Fields§
§state: CreditRegistrationState§is_superseded: boolA later attempt replaced this one.
error_code: Option<CreditRegistrationErrorCode>§resubmit_not_before: Option<DateTime<Utc>>§submitted_at: Option<DateTime<Utc>>Implementations§
Source§impl ResubmissionFacts
impl ResubmissionFacts
Sourcepub fn resubmission_refusal(
&self,
strictness: ResubmissionStrictness,
) -> Option<ResubmissionRefusal>
pub fn resubmission_refusal( &self, strictness: ResubmissionStrictness, ) -> Option<ResubmissionRefusal>
Whether the row may move back to ready_to_submit, and why not if it may not.
One precedence shared by the teacher-facing retry and the admin ledger’s hand transitions;
strictness is how far outside a failure a caller may move a row from. A row that has been
sent is refused at every strictness unless its state says the submission cannot count twice,
so awaiting_verification -> cancelled -> ready_to_submit cannot launder a resend.
Sourcefn uncertain_pending_window_end(&self) -> Option<DateTime<Utc>>
fn uncertain_pending_window_end(&self) -> Option<DateTime<Utc>>
Until when Suotar may still hold an uncertain submission as pending; None for a row in any
other state.
Sourcepub fn resubmission_availability(
&self,
strictness: ResubmissionStrictness,
) -> ResubmissionAvailability
pub fn resubmission_availability( &self, strictness: ResubmissionStrictness, ) -> ResubmissionAvailability
Whether the row may be sent again, how that send may go wrong, and for a refusal that only waits on time, when it lifts.
Sourcepub fn cancel_refusal(
&self,
strictness: ResubmissionStrictness,
) -> Option<ResubmissionRefusal>
pub fn cancel_refusal( &self, strictness: ResubmissionStrictness, ) -> Option<ResubmissionRefusal>
Why cancelling the row by hand is refused, or None if it may go ahead.
Refused while Sisu may be recording the submission: its request is in flight, or verify is waiting for the attainment, so a cancellation would tell the student “not registering” about credits that are arriving.
Sourcepub fn check_now_target(&self) -> Option<CheckNowTarget>
pub fn check_now_target(&self) -> Option<CheckNowTarget>
What making the row due now brings forward, or None where no phase acts on it sooner for
being due: a final state, a precondition wait, or a call already in flight.
Sourcepub fn check_now_refusal(&self) -> Option<ResubmissionRefusal>
pub fn check_now_refusal(&self) -> Option<ResubmissionRefusal>
Why checking the row now is refused, or None if it may go ahead.
Sourcepub fn admin_transition_refusal(
&self,
target: CreditRegistrationState,
strictness: ResubmissionStrictness,
) -> Option<ResubmissionRefusal>
pub fn admin_transition_refusal( &self, target: CreditRegistrationState, strictness: ResubmissionStrictness, ) -> Option<ResubmissionRefusal>
Why a hand transition of the row to target is refused, or None if it may go ahead.
The safety half of the admin path, next to the structural half in ADMIN_ONLY_TARGETS: the
edge table says the move exists, this decides whether this row may take it.
Sourcepub fn hand_actions(
&self,
strictness: ResubmissionStrictness,
) -> HandActionAvailability
pub fn hand_actions( &self, strictness: ResubmissionStrictness, ) -> HandActionAvailability
Every hand action’s availability at once, for a surface that offers them.
Trait Implementations§
Source§impl Clone for ResubmissionFacts
impl Clone for ResubmissionFacts
Source§fn clone(&self) -> ResubmissionFacts
fn clone(&self) -> ResubmissionFacts
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ResubmissionFacts
impl Debug for ResubmissionFacts
Source§impl PartialEq for ResubmissionFacts
impl PartialEq for ResubmissionFacts
impl Copy for ResubmissionFacts
impl StructuralPartialEq for ResubmissionFacts
Auto Trait Implementations§
impl Freeze for ResubmissionFacts
impl RefUnwindSafe for ResubmissionFacts
impl Send for ResubmissionFacts
impl Sync for ResubmissionFacts
impl Unpin for ResubmissionFacts
impl UnsafeUnpin for ResubmissionFacts
impl UnwindSafe for ResubmissionFacts
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].