Struct roctogen::endpoints::codes_of_conduct::CodesOfConduct[][src]

pub struct CodesOfConduct<'api> { /* fields omitted */ }

Implementations

impl<'api> CodesOfConduct<'api>[src]

pub async fn get_all_codes_of_conduct_async(
    &self
) -> Result<Vec<CodeOfConduct>, CodesOfConductGetAllCodesOfConductError>
[src]


Get all codes of conduct

GitHub API docs for get_all_codes_of_conduct

The get_all_codes_of_conduct_async endpoint is enabled with the scarlet-witch cargo feature.


pub fn get_all_codes_of_conduct(
    &self
) -> Result<Vec<CodeOfConduct>, CodesOfConductGetAllCodesOfConductError>
[src]


Get all codes of conduct

GitHub API docs for get_all_codes_of_conduct

The get_all_codes_of_conduct endpoint is enabled with the scarlet-witch cargo feature.


pub async fn get_conduct_code_async(
    &self,
    key: &str
) -> Result<CodeOfConduct, CodesOfConductGetConductCodeError>
[src]


Get a code of conduct

GitHub API docs for get_conduct_code

The get_conduct_code_async endpoint is enabled with the scarlet-witch cargo feature.


pub fn get_conduct_code(
    &self,
    key: &str
) -> Result<CodeOfConduct, CodesOfConductGetConductCodeError>
[src]


Get a code of conduct

GitHub API docs for get_conduct_code

The get_conduct_code endpoint is enabled with the scarlet-witch cargo feature.


pub async fn get_for_repo_async(
    &self,
    owner: &str,
    repo: &str
) -> Result<CodeOfConduct, CodesOfConductGetForRepoError>
[src]


Get the code of conduct for a repository

Returns the contents of the repository’s code of conduct file, if one is detected.

A code of conduct is detected if there is a file named CODE_OF_CONDUCT in the root directory of the repository. GitHub detects which code of conduct it is using fuzzy matching.

GitHub API docs for get_for_repo

The get_for_repo_async endpoint is enabled with the scarlet-witch cargo feature.


pub fn get_for_repo(
    &self,
    owner: &str,
    repo: &str
) -> Result<CodeOfConduct, CodesOfConductGetForRepoError>
[src]


Get the code of conduct for a repository

Returns the contents of the repository’s code of conduct file, if one is detected.

A code of conduct is detected if there is a file named CODE_OF_CONDUCT in the root directory of the repository. GitHub detects which code of conduct it is using fuzzy matching.

GitHub API docs for get_for_repo

The get_for_repo endpoint is enabled with the scarlet-witch cargo feature.


Auto Trait Implementations

impl<'api> RefUnwindSafe for CodesOfConduct<'api>

impl<'api> Send for CodesOfConduct<'api>

impl<'api> Sync for CodesOfConduct<'api>

impl<'api> Unpin for CodesOfConduct<'api>

impl<'api> UnwindSafe for CodesOfConduct<'api>

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.