pub struct Signed<K> { /* private fields */ }Expand description
encrypted cookie container type. must annotate the generic type param with types that can provide the key for encryption. See StateKey and ExtensionKey for detail.
Methods from Deref<Target = Key>§
sourcepub fn signing(&self) -> &[u8] ⓘ
pub fn signing(&self) -> &[u8] ⓘ
Returns the raw bytes of a key suitable for signing cookies. Guaranteed to be at least 32 bytes.
§Example
use cookie::Key;
let key = Key::generate();
let signing_key = key.signing();sourcepub fn encryption(&self) -> &[u8] ⓘ
pub fn encryption(&self) -> &[u8] ⓘ
Returns the raw bytes of a key suitable for encrypting cookies. Guaranteed to be at least 32 bytes.
§Example
use cookie::Key;
let key = Key::generate();
let encryption_key = key.encryption();Trait Implementations§
source§impl<'a, 'r, C, B, K> FromRequest<'a, WebContext<'r, C, B>> for Signed<K>where
K: for<'a2, 'r2> FromRequest<'a2, WebContext<'r2, C, B>, Error = Error<C>> + Into<Key>,
B: BodyStream,
impl<'a, 'r, C, B, K> FromRequest<'a, WebContext<'r, C, B>> for Signed<K>where
K: for<'a2, 'r2> FromRequest<'a2, WebContext<'r2, C, B>, Error = Error<C>> + Into<Key>,
B: BodyStream,
Auto Trait Implementations§
impl<K> RefUnwindSafe for Signed<K>
impl<K> Send for Signed<K>
impl<K> Sync for Signed<K>
impl<K> Unpin for Signed<K>
impl<K> UnwindSafe for Signed<K>
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