Struct cargo_registry::user::User
[−]
[src]
pub struct User { pub id: i32, pub email: Option<String>, pub gh_access_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
id: i32
email: Option<String>
gh_access_token: String
gh_login: String
name: Option<String>
gh_avatar: Option<String>
gh_id: i32
Methods
impl User
[src]
fn find_by_api_token(conn: &PgConnection, token_: &str) -> CargoResult<User>
[src]
Queries the database for a user with a certain api_token
value.
fn owning(krate: &Crate, conn: &PgConnection) -> CargoResult<Vec<Owner>>
[src]
fn encodable_private(self) -> EncodablePrivateUser
[src]
Converts this User
model into an EncodablePrivateUser
for JSON serialization.
fn encodable_public(self) -> EncodablePublicUser
[src]
Converts thisUser
model into an EncodablePublicUser
for JSON serialization.
Trait Implementations
impl Clone for User
[src]
fn clone(&self) -> User
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for User
[src]
impl PartialEq for User
[src]
fn eq(&self, __arg_0: &User) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &User) -> bool
[src]
This method tests for !=
.