Struct restapi::requests::auth::login_user::ApiResUserLogin
source · [−]pub struct ApiResUserLogin {
pub user_id: i32,
pub email: String,
pub state: i32,
pub verified: i32,
pub role: String,
pub token: String,
pub msg: String,
}
Expand description
ApiResUserLogin
Response type for login_user
Return user’s db record with new encrypted jwt
from the users_tokens
db table (on success).
Usage
This type is the serialized output for the function:
login_user
(crate::requests::auth::login_user::login_user]
and contained within the
hyper Body
of the
hyper Response
sent back to the client.
Arguments
user_id
-i32
- existing user idemail
-String
- unique user emailstate
-i32
- user state code (0
= an active user,1
= not active)verified
-i32
- is user email verified (0
= not verified,1
= verified)role
-String
- user roletoken
-String
- encrypted jwtmsg
-String
- error message
Fields
user_id: i32
email: String
state: i32
verified: i32
role: String
token: String
msg: String
Trait Implementations
sourceimpl Clone for ApiResUserLogin
impl Clone for ApiResUserLogin
sourcefn clone(&self) -> ApiResUserLogin
fn clone(&self) -> ApiResUserLogin
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<'de> Deserialize<'de> for ApiResUserLogin
impl<'de> Deserialize<'de> for ApiResUserLogin
sourcefn 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
sourceimpl Serialize for ApiResUserLogin
impl Serialize for ApiResUserLogin
Auto Trait Implementations
impl RefUnwindSafe for ApiResUserLogin
impl Send for ApiResUserLogin
impl Sync for ApiResUserLogin
impl Unpin for ApiResUserLogin
impl UnwindSafe for ApiResUserLogin
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more