Skip to main content

GroupSnapshot

Trait GroupSnapshot 

Source
pub trait GroupSnapshot: Send + Sync {
    // Required method
    fn current<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Arc<GroupGraph>, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
}
Expand description

The group-snapshot seam MembershipProvider resolves through – implemented by DbGroupsSource in production, and by a canned/error-returning test double in rust/auth/tests/membership_tests.rs, so this crate’s no-DB test policy can exercise the wrapper’s success and failure paths without a live Postgres.

Required Methods§

Source

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

Returns the current GroupGraph snapshot, or Err (typically a crate::types::ProviderUnavailable) on a store outage with no prior successful load.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§