pub struct Private<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 Private<K>
impl<'a, 'r, C, B, K> FromRequest<'a, WebContext<'r, C, B>> for Private<K>
Auto Trait Implementations§
impl<K> Freeze for Private<K>
impl<K> RefUnwindSafe for Private<K>
impl<K> Send for Private<K>
impl<K> Sync for Private<K>
impl<K> Unpin for Private<K>
impl<K> UnwindSafe for Private<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