pub struct Client<A> {
api: A,
}Expand description
A typed Forgejo backend over an injected Api implementation.
Fields§
§api: AImplementations§
Source§impl<A: Api> Client<A>
impl<A: Api> Client<A>
pub(super) async fn read_access( &self, repository: &RepoRef, config: Option<&Access<Permission>>, live: &mut Live, ) -> Result<(), ForgeError>
async fn read_caller(&self, organization: &str) -> Result<Caller, ForgeError>
pub(super) async fn apply_access( &self, repository: &RepoRef, operation: &AccessOperation<Permission>, ) -> Result<(), ForgeError>
Source§impl<A: Api> Client<A>
impl<A: Api> Client<A>
pub(super) async fn read_actions_variables( &self, repository: &RepoRef, config: Option<&ActionsVariables>, live: &mut Live, ) -> Result<(), ForgeError>
pub(super) async fn apply_actions_variables( &self, repository: &RepoRef, operation: &Operation, ) -> Result<(), ForgeError>
Source§impl<A: Api> Client<A>
impl<A: Api> Client<A>
pub(super) async fn read_branch_rules( &self, repository: &RepoRef, config: Option<&BranchRules>, live: &mut Live, ) -> Result<(), ForgeError>
pub(super) async fn apply_branch_rules( &self, repository: &RepoRef, operation: &Operation, ) -> Result<(), ForgeError>
async fn recover_existing_rule( &self, repository: &RepoRef, name: &str, rule: &BranchRule, ) -> Result<(), ForgeError>
Source§impl<A: Api> Client<A>
impl<A: Api> Client<A>
pub(super) async fn read_deploy_keys( &self, repository: &RepoRef, config: Option<&DeployKeys>, live: &mut Live, ) -> Result<(), ForgeError>
pub(super) async fn apply_deploy_keys( &self, repository: &RepoRef, operation: &Operation, ) -> Result<(), ForgeError>
Source§impl<A: Api> Client<A>
impl<A: Api> Client<A>
pub(super) async fn read_labels( &self, repository: &RepoRef, config: Option<&Labels<Label>>, live: &mut Live, ) -> Result<(), ForgeError>
pub(super) async fn apply_labels( &self, repository: &RepoRef, operation: &Operation, ) -> Result<(), ForgeError>
Source§impl<A: Api> Client<A>
impl<A: Api> Client<A>
pub(super) async fn read_repository( &self, repository: &RepoRef, live: &mut Live, ) -> Result<(), ForgeError>
pub(super) async fn read_topics( &self, repository: &RepoRef, topics: Option<&Vec<TopicName>>, live: &mut Live, ) -> Result<(), ForgeError>
pub(super) async fn apply_repository( &self, repository: &RepoRef, operation: &Operation, ) -> Result<(), ForgeError>
Source§impl<A: Api> Client<A>
impl<A: Api> Client<A>
pub(super) async fn read_tag_protection( &self, repository: &RepoRef, config: Option<&TagProtection>, live: &mut Live, ) -> Result<(), ForgeError>
pub(super) async fn apply_tag_protection( &self, repository: &RepoRef, operation: &Operation, ) -> Result<(), ForgeError>
Source§impl<A: Api> Client<A>
impl<A: Api> Client<A>
pub(super) async fn read_webhooks( &self, repository: &RepoRef, config: Option<&Webhooks>, live: &mut Live, ) -> Result<(), ForgeError>
pub(super) async fn apply_webhooks( &self, repository: &RepoRef, operation: &Operation, ) -> Result<(), ForgeError>
Trait Implementations§
Source§impl<A: Api> Backend for Client<A>
impl<A: Api> Backend for Client<A>
Source§type Error = ForgeError
type Error = ForgeError
The adapter’s transport or API error.
Source§type Operation = Operation
type Operation = Operation
One labelled write. The label names the resource the write changes.
Source§fn validate(config: &Config) -> Result<(), Self::Error>
fn validate(config: &Config) -> Result<(), Self::Error>
Check a configuration before any network access. Read more
Source§async fn read(
&self,
repository: &RepoRef,
config: &Config,
) -> Result<Live, Self::Error>
async fn read( &self, repository: &RepoRef, config: &Config, ) -> Result<Live, Self::Error>
Read the state that planning compares with
config.Auto Trait Implementations§
impl<A> Freeze for Client<A>where
A: Freeze,
impl<A> RefUnwindSafe for Client<A>where
A: RefUnwindSafe,
impl<A> Send for Client<A>where
A: Send,
impl<A> Sync for Client<A>where
A: Sync,
impl<A> Unpin for Client<A>where
A: Unpin,
impl<A> UnsafeUnpin for Client<A>where
A: UnsafeUnpin,
impl<A> UnwindSafe for Client<A>where
A: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more