Trait async_graphql::guard::Guard[][src]

pub trait Guard {
    fn check<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        ctx: &'life1 Context<'life2>
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
; }
Expand description

Field guard

Guard is a pre-condition for a field that is resolved if Ok(()) is returned, otherwise an error is returned.

This trait is defined through the async-trait macro.

Required methods

Check whether the guard will allow access to the field.

Implementors