pub struct Ticket {
pub id: String,
pub user_uri: String,
pub user_login: String,
pub result: ResultCode,
pub start_time: i64,
pub end_time: i64,
pub user_addr: String,
}Fields§
§id: String§user_uri: StringUri пользователя
user_login: Stringlogin пользователя
result: ResultCodeКод результата, если тикет не валидный != ResultCode.Ok
start_time: i64Дата начала действия тикета
end_time: i64Дата окончания действия тикета
user_addr: StringImplementations§
source§impl Ticket
impl Ticket
pub fn to_individual(&self) -> Individual
pub fn update_from_individual(&mut self, src: &mut Individual)
pub fn is_ticket_valid( &self, addr: &Option<IpAddr>, is_check_addr: bool, ) -> ResultCode
Trait Implementations§
source§impl PartialEq for Ticket
impl PartialEq for Ticket
source§impl ShallowCopy for Ticket
impl ShallowCopy for Ticket
source§unsafe fn shallow_copy(&self) -> ManuallyDrop<Self>
unsafe fn shallow_copy(&self) -> ManuallyDrop<Self>
Perform an aliasing copy of this value. Read more
impl Eq for Ticket
Auto Trait Implementations§
impl Freeze for Ticket
impl RefUnwindSafe for Ticket
impl Send for Ticket
impl Sync for Ticket
impl Unpin for Ticket
impl UnwindSafe for Ticket
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
source§impl<T> CallHasher for T
impl<T> CallHasher for T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more