Struct cargo_registry::user::User [] [src]

pub struct User {
    pub id: i32,
    pub email: Option<String>,
    pub gh_access_token: String,
    pub api_token: String,
    pub gh_login: String,
    pub name: Option<String>,
    pub gh_avatar: Option<String>,
    pub gh_id: i32,
}

The model representing a row in the users database table.

Fields

Methods

impl User
[src]

Queries the database for a user with a certain gh_login value.

Queries the database for a user with a certain api_token value.

Updates a user or inserts a new user into the database.

Converts this User model into an EncodableUser for JSON serialization.

Trait Implementations

impl Clone for User
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for User
[src]

Formats the value using the given formatter.

impl PartialEq for User
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for User
[src]

impl HasTable for User

impl<'ident> Identifiable for &'ident User

impl Model for User
[src]