Struct orchestrator::orchestrator::OrchestratorReference
source · pub struct OrchestratorReference<S: ExecutorGlobalState> { /* private fields */ }Expand description
A shared reference to the orchestrator
Methods from Deref<Target = Orchestrator<S>>§
sourcepub async fn process_exercise(
&self,
name: String,
source: String,
user: User<Authenticated>,
) -> Result<ExerciseResult, DynError>
pub async fn process_exercise( &self, name: String, source: String, user: User<Authenticated>, ) -> Result<ExerciseResult, DynError>
process the given exercise (name), and deliver the source (s). it gives back an ExerciseResult if all is gone well
sourcepub async fn add_exercise<ExerciseType: ExerciseDef + ExecutorState>(
&self,
name: &str,
source: &str,
) -> Result<(), DynError>
pub async fn add_exercise<ExerciseType: ExerciseDef + ExecutorState>( &self, name: &str, source: &str, ) -> Result<(), DynError>
add exercise, Then tries to do a normal execution, and check if it does indeed return full score if not returns an error (and obviusly doesn’t add it)
pub async fn get_exercise_info( &self, name: String, ) -> Result<Box<dyn ExerciseDef>, DynError>
Trait Implementations§
source§impl<S: Clone + ExecutorGlobalState> Clone for OrchestratorReference<S>
impl<S: Clone + ExecutorGlobalState> Clone for OrchestratorReference<S>
source§fn clone(&self) -> OrchestratorReference<S>
fn clone(&self) -> OrchestratorReference<S>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<S: ExecutorGlobalState> Deref for OrchestratorReference<S>
impl<S: ExecutorGlobalState> Deref for OrchestratorReference<S>
source§impl<S: ExecutorGlobalState> ReferenceWithoutState for OrchestratorReference<S>
impl<S: ExecutorGlobalState> ReferenceWithoutState for OrchestratorReference<S>
source§fn memory(&self) -> &dyn StatelessMemory
fn memory(&self) -> &dyn StatelessMemory
returns a memory reference (without state)
source§fn process_exercise<'life0, 'async_trait>(
&'life0 self,
name: String,
s: String,
user: User<Authenticated>,
) -> Pin<Box<dyn Future<Output = Result<ExerciseResult, DynError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn process_exercise<'life0, 'async_trait>(
&'life0 self,
name: String,
s: String,
user: User<Authenticated>,
) -> Pin<Box<dyn Future<Output = Result<ExerciseResult, DynError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
from exercise name, source string, and user authenticated
Auto Trait Implementations§
impl<S> Freeze for OrchestratorReference<S>
impl<S> !RefUnwindSafe for OrchestratorReference<S>
impl<S> Send for OrchestratorReference<S>
impl<S> Sync for OrchestratorReference<S>
impl<S> Unpin for OrchestratorReference<S>
impl<S> !UnwindSafe for OrchestratorReference<S>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)