pub struct OperatorAccess {
pub id: String,
pub code: String,
pub account: String,
pub operator: String,
pub reason: String,
pub minutes: u32,
pub requested_at_unix_ms: i64,
pub request_expires_at_unix_ms: i64,
pub state: OperatorAccessState,
pub granted_until_unix_ms: i64,
pub decided_by: String,
pub decided_at_unix_ms: i64,
}Expand description
One operator’s look into one account — the latest per pair.
Fields§
§id: StringRandom, 32 hex digits.
code: StringFor the eye, ABC-123: shown to the operator and beside the request,
so the admin approves the request the operator made.
account: StringThe account looked into.
operator: StringThe principal that asked (a person or machine with a server grant).
reason: StringWhy, in the operator’s words: the account admin reads it first.
minutes: u32How long the look lasts once approved.
requested_at_unix_ms: i64When it was asked for.
request_expires_at_unix_ms: i64When an unanswered request lapses.
state: OperatorAccessStateWhere it is (as stored; OperatorAccess::state_at for now).
granted_until_unix_ms: i64When an approved look ends; 0 until approved.
decided_by: StringWho decided (or ended) it.
decided_at_unix_ms: i64When.
Implementations§
Source§impl OperatorAccess
impl OperatorAccess
Sourcepub fn is_live_at(&self, now: i64) -> bool
pub fn is_live_at(&self, now: i64) -> bool
Does it let the operator read inside at now?
Sourcepub fn state_at(&self, now: i64) -> OperatorAccessState
pub fn state_at(&self, now: i64) -> OperatorAccessState
The state as it stands at now (a lapsed request, an ended look).
Sourcepub fn as_at(self, now: i64) -> OperatorAccess
pub fn as_at(self, now: i64) -> OperatorAccess
The row with OperatorAccess::state_at written in.
Trait Implementations§
Source§impl Clone for OperatorAccess
impl Clone for OperatorAccess
Source§impl Debug for OperatorAccess
impl Debug for OperatorAccess
Source§impl<'de> Deserialize<'de> for OperatorAccess
impl<'de> Deserialize<'de> for OperatorAccess
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
impl Eq for OperatorAccess
Source§impl PartialEq for OperatorAccess
impl PartialEq for OperatorAccess
Source§impl Serialize for OperatorAccess
impl Serialize for OperatorAccess
impl StructuralPartialEq for OperatorAccess
Auto Trait Implementations§
impl Freeze for OperatorAccess
impl RefUnwindSafe for OperatorAccess
impl Send for OperatorAccess
impl Sync for OperatorAccess
impl Unpin for OperatorAccess
impl UnsafeUnpin for OperatorAccess
impl UnwindSafe for OperatorAccess
Blanket Implementations§
impl<T> Allocation for T
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.