[][src]Struct octocrab::teams::TeamRepoHandler

pub struct TeamRepoHandler<'octo> { /* fields omitted */ }

Handler for managing a team's repositories through GitHub's teams API.

Created with TeamHandler::repos

Implementations

impl<'octo> TeamRepoHandler<'octo>[src]

pub async fn check_manages<'_>(
    &'_ self,
    repo_owner: impl Into<String>,
    repo_name: impl Into<String>
) -> Result<Repository>
[src]

Checks if a team manages a repository, returning the repository if it does.

let manages_repo = octocrab::instance()
    .teams("owner")
    .repos("team")
    .check_manages("owner", "repo")
    .await
    .is_ok();

pub async fn add_or_update<'_>(
    &'_ self,
    repo_owner: impl Into<String>,
    repo_name: impl Into<String>,
    permission: impl Into<Option<Permission>>
) -> Result<()>
[src]

Updates a team's permissions for a repository.

use octocrab::params;

octocrab::instance()
    .teams("owner")
    .repos("team")
    .add_or_update("owner", "repo", params::teams::Permission::Maintain)
    .await?;

pub async fn remove<'_>(
    &'_ self,
    repo_owner: impl Into<String>,
    repo_name: impl Into<String>
) -> Result<()>
[src]

Removes a repository from a team.

octocrab::instance()
    .teams("owner")
    .repos("team")
    .remove("owner", "repo")
    .await?;

Auto Trait Implementations

impl<'octo> !RefUnwindSafe for TeamRepoHandler<'octo>

impl<'octo> Send for TeamRepoHandler<'octo>

impl<'octo> Sync for TeamRepoHandler<'octo>

impl<'octo> Unpin for TeamRepoHandler<'octo>

impl<'octo> !UnwindSafe for TeamRepoHandler<'octo>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.