Skip to main content

AuthChallengePort

Trait AuthChallengePort 

Source
pub trait AuthChallengePort: Send + Sync {
    // Required methods
    fn publish_initial_requested<'life0, 'async_trait>(
        &'life0 self,
        kind: AuthChallengeKind,
        masked_target: Option<String>,
    ) -> Pin<Box<dyn Future<Output = Result<AuthChallengeSnapshot>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn wait_for_work<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<AuthChallengeWork>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn complete_request(&self, generation: u64) -> Result<AuthChallengeSnapshot>;
    fn fail_request(&self, generation: u64) -> Result<AuthChallengeSnapshot>;
    fn complete_input(
        &self,
        generation: u64,
        completion: InputCompletion,
    ) -> Result<AuthChallengeSnapshot>;
    fn snapshot(&self, generation: u64) -> Result<AuthChallengeSnapshot>;

    // Provided method
    fn complete_request_with(
        &self,
        generation: u64,
        publish: &mut dyn FnMut() -> Result<()>,
    ) -> Result<AuthChallengeSnapshot> { ... }
}

Required Methods§

Source

fn publish_initial_requested<'life0, 'async_trait>( &'life0 self, kind: AuthChallengeKind, masked_target: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<AuthChallengeSnapshot>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn wait_for_work<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<AuthChallengeWork>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn complete_request(&self, generation: u64) -> Result<AuthChallengeSnapshot>

Source

fn fail_request(&self, generation: u64) -> Result<AuthChallengeSnapshot>

Source

fn complete_input( &self, generation: u64, completion: InputCompletion, ) -> Result<AuthChallengeSnapshot>

Source

fn snapshot(&self, generation: u64) -> Result<AuthChallengeSnapshot>

Provided Methods§

Source

fn complete_request_with( &self, generation: u64, publish: &mut dyn FnMut() -> Result<()>, ) -> Result<AuthChallengeSnapshot>

Validate request-generation ownership and publish its external artifact in one linearization boundary. Production runtimes override this to hold their generation lock while publish runs.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§