pub struct CookieMessageStoreBuilder { /* private fields */ }
Expand description
A fluent builder to construct a CookieMessageStore
instance.
Implementations§
Source§impl CookieMessageStoreBuilder
impl CookieMessageStoreBuilder
By default, the cookie used to store messages is named _flash
.
You can use cookie_name
to set the name to a custom value.
Sourcepub fn bytes_size_limit(self, bytes_size_limit: u32) -> Self
pub fn bytes_size_limit(self, bytes_size_limit: u32) -> Self
By default, the cookie used to store flash messages is capped at 2048 bytes.
This is to ensure broad cross-browser compatibility while leaving enough room for other cookies in the response.
Make sure to research the limits of the browsers you are targeting before raising this limit.
Sourcepub fn path(self, path: String) -> Self
pub fn path(self, path: String) -> Self
By default, the Path
attribute is set to “/”.
Sourcepub fn domain(self, domain: String) -> Self
pub fn domain(self, domain: String) -> Self
By default, the Domain
attribute is left unset.
Sourcepub fn same_site(self, same_site: SameSite) -> Self
pub fn same_site(self, same_site: SameSite) -> Self
By default, the SameSite
attribute is Lax
.
Sourcepub fn build(self) -> CookieMessageStore
pub fn build(self) -> CookieMessageStore
Finalise the builder and return a CookieMessageStore
instance.
Auto Trait Implementations§
impl Freeze for CookieMessageStoreBuilder
impl RefUnwindSafe for CookieMessageStoreBuilder
impl Send for CookieMessageStoreBuilder
impl Sync for CookieMessageStoreBuilder
impl Unpin for CookieMessageStoreBuilder
impl UnwindSafe for CookieMessageStoreBuilder
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