pub struct AuthResponse {
pub status: u16,
pub headers: HashMap<String, String>,
pub body: Vec<u8>,
}Expand description
Authentication response wrapper
Fields§
§status: u16§headers: HashMap<String, String>§body: Vec<u8>Implementations§
Source§impl AuthResponse
impl AuthResponse
pub fn new(status: u16) -> AuthResponse
pub fn json<T>(status: u16, data: &T) -> Result<AuthResponse, Error>where
T: Serialize,
pub fn text(status: u16, text: impl Into<String>) -> AuthResponse
pub fn with_header( self, name: impl Into<String>, value: impl Into<String>, ) -> AuthResponse
Trait Implementations§
Source§impl Clone for AuthResponse
impl Clone for AuthResponse
Source§fn clone(&self) -> AuthResponse
fn clone(&self) -> AuthResponse
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AuthResponse
impl RefUnwindSafe for AuthResponse
impl Send for AuthResponse
impl Sync for AuthResponse
impl Unpin for AuthResponse
impl UnsafeUnpin for AuthResponse
impl UnwindSafe for AuthResponse
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