pub struct SessionKey(pub Uuid);
Expand description
Identifier for each session (one per client browser).
Tuple Fields§
§0: Uuid
Implementations§
Source§impl SessionKey
impl SessionKey
Sourcepub fn is_present(&self)
pub fn is_present(&self)
Ensures at compile-time that a session key is present.
A handler which called this method can only be called with a (valid)
session key and thus do not present a security hole. Furthermore, having
such a method call in the handler prevents accidental removal of the
SessionKey
argument to the handler.
Trait Implementations§
Source§impl Clone for SessionKey
impl Clone for SessionKey
Source§fn clone(&self) -> SessionKey
fn clone(&self) -> SessionKey
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 moreSource§impl Debug for SessionKey
impl Debug for SessionKey
Source§impl Default for SessionKey
impl Default for SessionKey
Source§impl<S> FromRequestParts<S> for SessionKey
impl<S> FromRequestParts<S> for SessionKey
Source§impl Hash for SessionKey
impl Hash for SessionKey
Source§impl PartialEq for SessionKey
impl PartialEq for SessionKey
impl Eq for SessionKey
impl StructuralPartialEq for SessionKey
Auto Trait Implementations§
impl Freeze for SessionKey
impl RefUnwindSafe for SessionKey
impl Send for SessionKey
impl Sync for SessionKey
impl Unpin for SessionKey
impl UnwindSafe for SessionKey
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<S, T> FromRequest<S, ViaParts> for T
impl<S, T> FromRequest<S, ViaParts> for T
Source§type Rejection = <T as FromRequestParts<S>>::Rejection
type Rejection = <T as FromRequestParts<S>>::Rejection
If the extractor fails it’ll use this “rejection” type. A rejection is
a kind of error that can be converted into a response.
Source§fn from_request(
req: Request<Body>,
state: &S,
) -> impl Future<Output = Result<T, <T as FromRequest<S, ViaParts>>::Rejection>>
fn from_request( req: Request<Body>, state: &S, ) -> impl Future<Output = Result<T, <T as FromRequest<S, ViaParts>>::Rejection>>
Perform the extraction.