pub trait BrowserProfileAccessRepository {
// Required methods
fn get_by_user_id_and_browser_profile_id<'life0, 'async_trait>(
&'life0 self,
user_id: i64,
browser_profile_id: i64,
) -> Pin<Box<dyn Future<Output = Result<Option<BrowserProfileAccess>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_teamlead_id_by_browser_profile<'life0, 'async_trait>(
&'life0 self,
browser_profile: MiniBrowserProfile,
) -> Pin<Box<dyn Future<Output = Result<Option<i64>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Defines the interface for accessing browser profile access data.
This trait provides methods to query browser profile access permissions and related teamlead information from the database.
Required Methods§
sourcefn get_by_user_id_and_browser_profile_id<'life0, 'async_trait>(
&'life0 self,
user_id: i64,
browser_profile_id: i64,
) -> Pin<Box<dyn Future<Output = Result<Option<BrowserProfileAccess>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_by_user_id_and_browser_profile_id<'life0, 'async_trait>(
&'life0 self,
user_id: i64,
browser_profile_id: i64,
) -> Pin<Box<dyn Future<Output = Result<Option<BrowserProfileAccess>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves browser profile access permissions for a specific user and profile.
§Arguments
user_id- The ID of the user whose permissions are being queriedbrowser_profile_id- The ID of the browser profile to check permissions for
§Returns
Ok(Some(BrowserProfileAccess))if permissions are foundOk(None)if no permissions existErrif there was a database error
sourcefn get_teamlead_id_by_browser_profile<'life0, 'async_trait>(
&'life0 self,
browser_profile: MiniBrowserProfile,
) -> Pin<Box<dyn Future<Output = Result<Option<i64>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_teamlead_id_by_browser_profile<'life0, 'async_trait>(
&'life0 self,
browser_profile: MiniBrowserProfile,
) -> Pin<Box<dyn Future<Output = Result<Option<i64>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Implementors§
impl BrowserProfileAccessRepository for Database
Implementation of BrowserProfileAccessRepository for the main database.
impl BrowserProfileAccessRepository for MockBrowserProfileAccessRepository
Defines the interface for accessing browser profile access data.
This trait provides methods to query browser profile access permissions and related teamlead information from the database.