struct ResolveEnrolments;Trait Implementations§
Source§impl SuotarBatchPhase for ResolveEnrolments
impl SuotarBatchPhase for ResolveEnrolments
Source§type Row = (CreditRegistration, SubmissionContext)
type Row = (CreditRegistration, SubmissionContext)
The frozen context travels with the row: the answer is applied against what was asked, not against a second read of the database.
Source§const ALL_TRANSIENT_ERROR: &'static str = "Every item of the batch came back transiently unavailable."
const ALL_TRANSIENT_ERROR: &'static str = "Every item of the batch came back transiently unavailable."
The iteration’s error when every item came back transiently unavailable.
Source§type Item = ResolveEnrolmentRequestItem
type Item = ResolveEnrolmentRequestItem
The request item, which is also what the audit log records as sent.
Source§type Result = EnrolmentResolutionResult
type Result = EnrolmentResolutionResult
The endpoint’s per-item result body.
Source§async fn prepare(
&mut self,
_ctx: &PhaseContext<'_>,
conn: &mut PgConnection,
scope: &PhaseScope,
) -> Result<Prepared<Self::Row, Self::Item>>
async fn prepare( &mut self, _ctx: &PhaseContext<'_>, conn: &mut PgConnection, scope: &PhaseScope, ) -> Result<Prepared<Self::Row, Self::Item>>
Claims rows and decides what may be asked about them. Whatever has to be true before the
request leaves is written here, in the caller’s transaction.
fn registration((row, _): &Self::Row) -> &CreditRegistration
Source§fn request_item_id((row, _): &Self::Row) -> String
fn request_item_id((row, _): &Self::Row) -> String
What the row was addressed as, and so how its answer is found again.
Source§fn sent_student_number((_, context): &Self::Row) -> Option<&str>
fn sent_student_number((_, context): &Self::Row) -> Option<&str>
The student number this row’s request carried, where it carried one: a number the registry
rejects may only cost the link it was sent under.
async fn send( &self, ctx: &PhaseContext<'_>, rows: &[Self::Row], items: Vec<Self::Item>, ) -> Result<SuotarBatchResponse<Self::Result>, UtilError>
Source§async fn apply(
&self,
conn: &mut PgConnection,
__arg2: &Self::Row,
item: Option<&SuotarResponseItem<Self::Result>>,
event: OutcomeEvent<'_>,
) -> Result<bool>
async fn apply( &self, conn: &mut PgConnection, __arg2: &Self::Row, item: Option<&SuotarResponseItem<Self::Result>>, event: OutcomeEvent<'_>, ) -> Result<bool>
Applies one answer, or the absence of one, to its row. Returns whether the row ended up in a
failure state; errors with
PreconditionFailed if another writer moved the row meanwhile.Source§async fn apply_request_rejection(
&self,
conn: &mut PgConnection,
__arg2: &Self::Row,
request: &Value,
error: &UtilError,
) -> Result<bool>
async fn apply_request_rejection( &self, conn: &mut PgConnection, __arg2: &Self::Row, request: &Value, error: &UtilError, ) -> Result<bool>
What one row gets when the study registry rejected the whole request.
Auto Trait Implementations§
impl Freeze for ResolveEnrolments
impl RefUnwindSafe for ResolveEnrolments
impl Send for ResolveEnrolments
impl Sync for ResolveEnrolments
impl Unpin for ResolveEnrolments
impl UnsafeUnpin for ResolveEnrolments
impl UnwindSafe for ResolveEnrolments
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<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> ⓘ
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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
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>,
Applies the layer to a service and wraps it in [
Layered].§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ServiceExt for T
impl<T> ServiceExt for T
§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Apply a transformation to the response body. Read more
§fn decompression(self) -> Decompression<Self>where
Self: Sized,
fn decompression(self) -> Decompression<Self>where
Self: Sized,
Decompress response bodies. Read more
§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using HTTP status codes. Read more
§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using gRPC headers. Read more