pub fn is_valid_login_token(user_token: &UserToken, conn: &PgConnection) -> bool {
        users
            .filter(id.eq(&user_token.id))
            .filter(username.eq(&user_token.username))
            .get_result::<User>(conn)
            .is_ok()
    }
/// Checks whether the given token is valid, ie whether it corresponds to a real user in
/// the users table.
Checks whether the given token is valid, ie whether it corresponds to a real user in
the users table.
Checks whether the given token is valid ie whether it corresponds to a real user in the users table .
pub fn is_valid_login_token(user_token: &UserToken, conn: &PgConnection) -> bool {
        users
            .filter(id.eq(&user_token.id))
            .filter(username.eq(&user_token.username))
            .get_result::<User>(conn)
            .is_ok()
    }
pub fn is_valid_login_token ( user_token : & UserToken , conn : & PgConnection ) -> bool { users . filter ( id . eq ( & user_token . id ) ) . filter ( username . eq ( & user_token . username ) ) . get_result :: < User > ( conn ) . is_ok ( ) }
Checks whether the given token is valid, ie whether it corresponds to a real user in
the users table.
Checks whether the given token is valid ie whether it corresponds to a real user in the users table .
user_token
&UserToken
conn
&PgConnection
user_token
&UserToken
conn
&PgConnection