[][src]Struct github_stats::Repo

pub struct Repo { /* fields omitted */ }

Represents that stats of a Github repository.

Methods

impl Repo[src]

pub fn new(user: &str, repo: &str) -> Result<Self>[src]

Creates a new Repo.

Example

use github_stats::Repo;

let repo = Repo::new("rust-lang", "rust");

pub fn name(&self) -> &str[src]

Gets the repository's name.

pub fn size(&self) -> f64[src]

Gets the repository's size in kilobytes.

pub fn human_size(&self, precision: usize) -> String[src]

Gets the repository's size in a human-readable format.

precision is the number of decimal places to display.

pub fn stars(&self) -> u64[src]

Gets the repository's star count.

pub fn forks(&self) -> u64[src]

Gets the repository's fork count.

pub fn open_issues(&self) -> u64[src]

Gets the repository's open issue count.

pub fn closed_issues(&self) -> u64[src]

Gets the repository's closed issue count.

pub fn open_pull_requests(&self) -> u64[src]

Gets the repository's open pull request count.

pub fn closed_pull_requests(&self) -> u64[src]

Gets the repository's closed pull request count.

Trait Implementations

impl Debug for Repo[src]

Auto Trait Implementations

impl Send for Repo

impl Unpin for Repo

impl Sync for Repo

impl UnwindSafe for Repo

impl RefUnwindSafe for Repo

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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