Struct roctogen::endpoints::licenses::Licenses[][src]

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

Implementations

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

pub async fn get_async(
    &self,
    license: &str
) -> Result<License, LicensesGetError>
[src]

pub fn get(&self, license: &str) -> Result<License, LicensesGetError>[src]

pub async fn get_all_commonly_used_async(
    &self,
    query_params: Option<impl Into<LicensesGetAllCommonlyUsedParams>>
) -> Result<Vec<LicenseSimple>, LicensesGetAllCommonlyUsedError>
[src]

pub fn get_all_commonly_used(
    &self,
    query_params: Option<impl Into<LicensesGetAllCommonlyUsedParams>>
) -> Result<Vec<LicenseSimple>, LicensesGetAllCommonlyUsedError>
[src]

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


Get the license for a repository

This method returns the contents of the repository’s license file, if one is detected.

Similar to Get repository content, this method also supports custom media types for retrieving the raw license content or rendered license HTML.

GitHub API docs for get_for_repo


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


Get the license for a repository

This method returns the contents of the repository’s license file, if one is detected.

Similar to Get repository content, this method also supports custom media types for retrieving the raw license content or rendered license HTML.

GitHub API docs for get_for_repo


Auto Trait Implementations

impl<'api> RefUnwindSafe for Licenses<'api>

impl<'api> Send for Licenses<'api>

impl<'api> Sync for Licenses<'api>

impl<'api> Unpin for Licenses<'api>

impl<'api> UnwindSafe for Licenses<'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.