Struct cargo_registry::owner::Team [] [src]

pub struct Team {
    pub id: i32,
    pub login: String,
    pub github_id: i32,
    pub name: Option<String>,
    pub avatar: Option<String>,
}

For now, just a Github Team. Can be upgraded to other teams later if desirable.

Fields

Unique table id

"github:org:team" An opaque unique ID, that was at one point parsed out to query Github. We only query membership with github using the github_id, though. This is the only name we should ever talk to Cargo about.

We're assuming these are stable

Sugary goodness

Methods

impl Team
[src]

[src]

Tries to create the Team in the DB (assumes a : has already been found).

[src]

Tries to create a Github Team from scratch. Assumes org and team are correctly parsed out of the full name. name is passed as a convenience to avoid rebuilding it.

[src]

Phones home to Github to ask if this User is a member of the given team. Note that we're assuming that the given user is the one interested in the answer. If this is not the case, then we could accidentally leak private membership information here.

[src]

[src]

[src]

Trait Implementations

impl HasTable for Team

impl<'ident> Identifiable for &'ident Team

impl Debug for Team
[src]

[src]

Formats the value using the given formatter.