pub struct CookieConfig { /* private fields */ }
Expand description
Represents values used during cookie retrieval.
§Example
You can create a CookieConfig
using the following code:
use axum_rails_cookie::{CookieConfig, CookieAlgorithm};
let name = "_my_app_session_id";
let secret = "3b53beba93922c29b3c335051f79e41c63fe626834d5a4a7ce96ebd189010063";
let algorithm = CookieAlgorithm::AesHmac;
let encryptor = CookieConfig::new(name, secret, algorithm);
Implementations§
Source§impl CookieConfig
impl CookieConfig
pub fn new( name: &'static str, secret: &'static str, algorithm: CookieAlgorithm, ) -> Self
Trait Implementations§
Source§impl Clone for CookieConfig
impl Clone for CookieConfig
Source§fn clone(&self) -> CookieConfig
fn clone(&self) -> CookieConfig
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 CookieConfig
impl Debug for CookieConfig
Auto Trait Implementations§
impl Freeze for CookieConfig
impl RefUnwindSafe for CookieConfig
impl Send for CookieConfig
impl Sync for CookieConfig
impl Unpin for CookieConfig
impl UnwindSafe for CookieConfig
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