Struct game_features::User[][src]

pub struct User<T> {
    pub id: i32,
    pub name: String,
    pub data: T,
}

Base struct for the user of a game.

Fields

id: i32

The numerical id of the user.

name: String

The name of the user.

data: T

Extra data associated with the user.

Note: this is not where you want to store your hashed pashwords.

Implementations

impl<T> User<T>[src]

pub fn new(id: i32, name: String, data: T) -> Self[src]

Constructs a new User.

Trait Implementations

impl<T: Clone> Clone for User<T>[src]

impl<T: Debug> Debug for User<T>[src]

impl<'de, T> Deserialize<'de> for User<T> where
    T: Deserialize<'de>, 
[src]

impl<T> Serialize for User<T> where
    T: Serialize
[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for User<T> where
    T: RefUnwindSafe

impl<T> Send for User<T> where
    T: Send

impl<T> Sync for User<T> where
    T: Sync

impl<T> Unpin for User<T> where
    T: Unpin

impl<T> UnwindSafe for User<T> where
    T: UnwindSafe

Blanket Implementations

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

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

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

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.