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§
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 Methods§
Sourcefn complete_request_with(
&self,
generation: u64,
publish: &mut dyn FnMut() -> Result<()>,
) -> Result<AuthChallengeSnapshot>
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".