Struct rust_default::RustDefaultPlugin
source · pub struct RustDefaultPlugin { /* private fields */ }Expand description
Add all it’s needed for a normal rust executor It follows the build pattern
Implementations§
source§impl RustDefaultPlugin
impl RustDefaultPlugin
sourcepub fn set_activate_default(self) -> Self
pub fn set_activate_default(self) -> Self
activate the default implementation (so Rust related executors)
Trait Implementations§
source§impl Default for RustDefaultPlugin
impl Default for RustDefaultPlugin
source§fn default() -> RustDefaultPlugin
fn default() -> RustDefaultPlugin
Returns the “default value” for a type. Read more
source§impl<S> Plugin<S> for RustDefaultPluginwhere
S: From<RustExercise> + From<RustGeneratedFiles> + From<RustCompiled> + From<ExerciseResult> + ExecutorGlobalState,
RustGeneratedFiles: TryFrom<S>,
RustCompiled: TryFrom<S>,
RustExercise: TryFrom<S>,
impl<S> Plugin<S> for RustDefaultPluginwhere
S: From<RustExercise> + From<RustGeneratedFiles> + From<RustCompiled> + From<ExerciseResult> + ExecutorGlobalState,
RustGeneratedFiles: TryFrom<S>,
RustCompiled: TryFrom<S>,
RustExercise: TryFrom<S>,
source§fn desctiption(&self) -> &str
fn desctiption(&self) -> &str
Return a descriptionn of the Plugin. It should contain a list of the registered and activated Executors
source§async fn on_add<'a>(
&'a mut self,
o: &'a mut Orchestrator<S>,
) -> Result<(), Box<dyn Error + Send + Sync + 'static>>
async fn on_add<'a>( &'a mut self, o: &'a mut Orchestrator<S>, ) -> Result<(), Box<dyn Error + Send + Sync + 'static>>
When the plugin gets added to the Orchestrator, this function gets called.
It gives complete control on the unrunned executor.
It should be used to register/activate executor, add other Plugins, add Exercise (discouraged)…
§fn run(
self,
o: OrchestratorReference<S>,
should_stop: Arc<Notify>,
) -> impl Future<Output = ()> + Send + 'static
fn run( self, o: OrchestratorReference<S>, should_stop: Arc<Notify>, ) -> impl Future<Output = ()> + Send + 'static
Function called when the Plugin is runned (at the end of the init phase).
it takes an OrchestratorReference, which permit almost complete control over the orchestrator, and a shared Notify.
This notify should get called when a Plugin request an orchestrator shutdown.
Auto Trait Implementations§
impl Freeze for RustDefaultPlugin
impl RefUnwindSafe for RustDefaultPlugin
impl Send for RustDefaultPlugin
impl Sync for RustDefaultPlugin
impl Unpin for RustDefaultPlugin
impl UnwindSafe for RustDefaultPlugin
Blanket Implementations§
§impl<T> AsyncDefault for Twhere
T: Default,
impl<T> AsyncDefault for Twhere
T: Default,
§async fn async_default() -> T
async fn async_default() -> T
Same function as Default::default(), but async
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