pub struct SessionInfo {
pub key: Option<String>,
pub count: Option<u32>,
pub sub_exp: Option<String>,
pub gm_time: Option<String>,
pub message: Option<String>,
pub error: Option<String>,
}Expand description
Session information and status
Fields§
§key: Option<String>Session key for authenticated requests
count: Option<u32>Number of lookups performed in current 24-hour period
sub_exp: Option<String>Subscription expiration date or “non-subscriber”
gm_time: Option<String>Current GMT time
message: Option<String>Informational message
error: Option<String>Error message
Implementations§
Source§impl SessionInfo
impl SessionInfo
Sourcepub fn has_valid_session(&self) -> bool
pub fn has_valid_session(&self) -> bool
Check if session has a valid key
Sourcepub fn error_message(&self) -> Option<&str>
pub fn error_message(&self) -> Option<&str>
Get the error message if present
Sourcepub fn info_message(&self) -> Option<&str>
pub fn info_message(&self) -> Option<&str>
Get the informational message if present
Trait Implementations§
Source§impl Clone for SessionInfo
impl Clone for SessionInfo
Source§fn clone(&self) -> SessionInfo
fn clone(&self) -> SessionInfo
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 moreSource§impl Debug for SessionInfo
impl Debug for SessionInfo
Source§impl<'de> Deserialize<'de> for SessionInfo
impl<'de> Deserialize<'de> for SessionInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SessionInfo
impl RefUnwindSafe for SessionInfo
impl Send for SessionInfo
impl Sync for SessionInfo
impl Unpin for SessionInfo
impl UnsafeUnpin for SessionInfo
impl UnwindSafe for SessionInfo
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