Struct csrf::CsrfToken
[−]
[src]
pub struct CsrfToken { /* fields omitted */ }
A signed, encrypted CSRF token that is suitable to be displayed to end users.
Methods
impl CsrfToken
[src]
fn new(bytes: Vec<u8>) -> Self
Create a new token from the given bytes.
fn b64_string(&self) -> String
Retrieve the CSRF token as a base64 encoded string.
fn b64_url_string(&self) -> String
Retrieve the CSRF token as a URL safe base64 encoded string.
fn value(&self) -> &[u8]
Get be raw value of this token.
Trait Implementations
impl Eq for CsrfToken
[src]
impl PartialEq for CsrfToken
[src]
fn eq(&self, __arg_0: &CsrfToken) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &CsrfToken) -> bool
This method tests for !=
.
impl Debug for CsrfToken
[src]
impl Clone for CsrfToken
[src]
fn clone(&self) -> CsrfToken
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more