Skip to main content

Checker

Trait Checker 

Source
pub trait Checker: Send + Sync {
    // Required method
    fn check<'life0, 'life1, 'async_trait>(
        &'life0 self,
        request: CheckerRequest<'life1>,
    ) -> Pin<Box<dyn Future<Output = Option<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

An asynchronous, cancellation-safe sandboxed checker.

Dropping the returned future must cancel the check or terminate its isolated worker. VGR also enforces CheckerRequest::deadline around every call.

Required Methods§

Source

fn check<'life0, 'life1, 'async_trait>( &'life0 self, request: CheckerRequest<'life1>, ) -> Pin<Box<dyn Future<Output = Option<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Runs the task’s checks against an attempt, reporting whether they passed.

None means the checks could not be run to a conclusion — a timeout, a sandbox failure, a missing manifest. It is not a failure verdict, but it commits nothing either.

Implementors§