pub struct SessionExpires {
pub interval_secs: u32,
pub refresher: Option<Refresher>,
}Expand description
Parsed Session-Expires header value: interval in seconds plus the
optional refresher parameter.
Fields§
§interval_secs: u32Session interval in seconds.
refresher: Option<Refresher>Who refreshes, if pinned. None means “answerer’s choice”.
Implementations§
Source§impl SessionExpires
impl SessionExpires
Sourcepub fn parse(value: &str) -> Result<Self, String>
pub fn parse(value: &str) -> Result<Self, String>
Parse a Session-Expires header value (not the full header
line), e.g. "1800" or "1800;refresher=uas". Parameter names
and values are case-insensitive; unknown parameters are ignored
per RFC 4028 §4.
Sourcepub fn header_value(&self) -> String
pub fn header_value(&self) -> String
Serialize back to a header value, e.g. "1800;refresher=uac".
Trait Implementations§
Source§impl Clone for SessionExpires
impl Clone for SessionExpires
Source§fn clone(&self) -> SessionExpires
fn clone(&self) -> SessionExpires
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SessionExpires
Source§impl Debug for SessionExpires
impl Debug for SessionExpires
impl Eq for SessionExpires
Source§impl PartialEq for SessionExpires
impl PartialEq for SessionExpires
Source§fn eq(&self, other: &SessionExpires) -> bool
fn eq(&self, other: &SessionExpires) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SessionExpires
Auto Trait Implementations§
impl Freeze for SessionExpires
impl RefUnwindSafe for SessionExpires
impl Send for SessionExpires
impl Sync for SessionExpires
impl Unpin for SessionExpires
impl UnsafeUnpin for SessionExpires
impl UnwindSafe for SessionExpires
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.