pub trait RepoScopes: Send + Sync {
// Required methods
fn assignment_blocked(&self, integration_id: &str, project: &str) -> bool;
fn token<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
integration_id: &'life1 str,
project: &'life2 str,
refresh: bool,
) -> Pin<Box<dyn Future<Output = Option<Result<String>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn acts_as_bot(&self, integration_id: &str, project: &str) -> bool;
// Provided methods
fn post_as(&self, _integration_id: &str, _project: &str) -> Option<String> { ... }
fn learned_login(
&self,
_integration_id: &str,
_project: &str,
) -> Option<String> { ... }
fn learn_login(&self, _integration_id: &str, _project: &str, _login: &str) { ... }
}Expand description
What a repository’s stored settings say about its host calls.
Required Methods§
Sourcefn assignment_blocked(&self, integration_id: &str, project: &str) -> bool
fn assignment_blocked(&self, integration_id: &str, project: &str) -> bool
Whether nothing may be assigned in project of integration_id.
Sourcefn token<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
integration_id: &'life1 str,
project: &'life2 str,
refresh: bool,
) -> Pin<Box<dyn Future<Output = Option<Result<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn token<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
integration_id: &'life1 str,
project: &'life2 str,
refresh: bool,
) -> Pin<Box<dyn Future<Output = Option<Result<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
The token the repository’s token command gives for its host calls,
None when the repository does not use one (the personal token
applies). refresh: the host refused the previous one, so ask the
command again. An Err refuses the call: it never falls back to the
personal token.
Sourcefn acts_as_bot(&self, integration_id: &str, project: &str) -> bool
fn acts_as_bot(&self, integration_id: &str, project: &str) -> bool
Whether the repository’s host calls are made by an App bot.
Provided Methods§
Sourcefn post_as(&self, _integration_id: &str, _project: &str) -> Option<String>
fn post_as(&self, _integration_id: &str, _project: &str) -> Option<String>
The “Post as” name the user configured for project: the
repository’s own, else the global general.hosting_post_as.
Sourcefn learned_login(&self, _integration_id: &str, _project: &str) -> Option<String>
fn learned_login(&self, _integration_id: &str, _project: &str) -> Option<String>
The login learned from the author of our first post, kept in the repository’s state.
Sourcefn learn_login(&self, _integration_id: &str, _project: &str, _login: &str)
fn learn_login(&self, _integration_id: &str, _project: &str, _login: &str)
Remembers login as who the repository’s token posts as.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".