pub enum InstructionsList {
Task {
exercise_id: Uuid,
task_id: Uuid,
},
Review {
exercise_id: Uuid,
},
CourseDefaultReview {
config_id: Uuid,
},
}Expand description
One list of instruction blocks.
Variants§
Task
Review
The exercise’s own review instructions.
CourseDefaultReview
The course default review config’s instructions, shared by every exercise using it.
Implementations§
Source§impl InstructionsList
impl InstructionsList
Sourcepub fn document_id(self) -> Uuid
pub fn document_id(self) -> Uuid
The id the list’s document goes by in the engines: the task’s, the exercise’s or the default config’s, which no page shares.
Sourcepub fn path_prefix(self) -> String
pub fn path_prefix(self) -> String
The path patch_exercise and get_exercise address the list’s top level with.
Sourcepub fn exercise_id(self) -> Option<Uuid>
pub fn exercise_id(self) -> Option<Uuid>
The exercise the list belongs to; None for the course default’s.
Sourcepub fn location(self) -> InstructionsLocation
pub fn location(self) -> InstructionsLocation
Where the list is, for results.
Sourcepub fn page(self, state: &CourseState) -> Option<Uuid>
pub fn page(self, state: &CourseState) -> Option<Uuid>
The page holding the list’s exercise in state; None for the course default’s.
Sourcepub fn validation_context(self) -> ExerciseContext
pub fn validation_context(self) -> ExerciseContext
What the list’s blocks are validated as the children of.
Sourcefn stored_blocks(self, state: &CourseState) -> Option<Option<&Value>>
fn stored_blocks(self, state: &CourseState) -> Option<Option<&Value>>
The stored blocks of the list in state; None if the state doesn’t have it.
Sourcepub fn document(
self,
state: &CourseState,
) -> Option<Result<PageDocument, EditError>>
pub fn document( self, state: &CourseState, ) -> Option<Result<PageDocument, EditError>>
The list in state as a document; None if the state doesn’t have it.
Sourcepub fn set_blocks(self, state: &mut CourseState, blocks: &[GutenbergBlock])
pub fn set_blocks(self, state: &mut CourseState, blocks: &[GutenbergBlock])
Sets the list’s blocks in state. Review instructions without content are stored as null,
as the editors store them.
Trait Implementations§
Source§impl Clone for InstructionsList
impl Clone for InstructionsList
Source§fn clone(&self) -> InstructionsList
fn clone(&self) -> InstructionsList
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InstructionsList
impl Debug for InstructionsList
Source§impl Hash for InstructionsList
impl Hash for InstructionsList
Source§impl PartialEq for InstructionsList
impl PartialEq for InstructionsList
impl Copy for InstructionsList
impl Eq for InstructionsList
impl StructuralPartialEq for InstructionsList
Auto Trait Implementations§
impl Freeze for InstructionsList
impl RefUnwindSafe for InstructionsList
impl Send for InstructionsList
impl Sync for InstructionsList
impl Unpin for InstructionsList
impl UnsafeUnpin for InstructionsList
impl UnwindSafe for InstructionsList
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§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>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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].