pub struct CreateSessionInput {
pub id: Option<String>,
pub user_id: String,
pub expires_at: OffsetDateTime,
pub token: Option<String>,
pub ip_address: Option<String>,
pub user_agent: Option<String>,
pub additional_fields: DbRecord,
}Expand description
Input for creating a persisted session.
Fields§
§id: Option<String>§user_id: String§expires_at: OffsetDateTime§token: Option<String>§ip_address: Option<String>§user_agent: Option<String>§additional_fields: DbRecordImplementations§
Source§impl CreateSessionInput
impl CreateSessionInput
pub fn new(user_id: impl Into<String>, expires_at: OffsetDateTime) -> Self
pub fn id(self, id: impl Into<String>) -> Self
pub fn token(self, token: impl Into<String>) -> Self
pub fn ip_address(self, ip_address: impl Into<String>) -> Self
pub fn user_agent(self, user_agent: impl Into<String>) -> Self
pub fn additional_fields(self, additional_fields: DbRecord) -> Self
Trait Implementations§
Source§impl Clone for CreateSessionInput
impl Clone for CreateSessionInput
Source§fn clone(&self) -> CreateSessionInput
fn clone(&self) -> CreateSessionInput
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 CreateSessionInput
impl Debug for CreateSessionInput
Source§impl PartialEq for CreateSessionInput
impl PartialEq for CreateSessionInput
Source§fn eq(&self, other: &CreateSessionInput) -> bool
fn eq(&self, other: &CreateSessionInput) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CreateSessionInput
Auto Trait Implementations§
impl Freeze for CreateSessionInput
impl RefUnwindSafe for CreateSessionInput
impl Send for CreateSessionInput
impl Sync for CreateSessionInput
impl Unpin for CreateSessionInput
impl UnsafeUnpin for CreateSessionInput
impl UnwindSafe for CreateSessionInput
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