pub struct User<T> {
pub id: i32,
pub name: String,
pub data: T,
}Expand description
Base struct for the user of a game.
Fields§
§id: i32The numerical id of the user.
name: StringThe name of the user.
data: TExtra data associated with the user.
Note: this is not where you want to store your hashed pashwords.
Implementations§
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for User<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for User<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<T> Freeze for User<T>where
T: Freeze,
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more