pub struct Logins {
pub timing: Timing,
/* private fields */
}Expand description
The logins in progress.
Fields§
§timing: TimingThe clocks and limits.
Implementations§
Source§impl Logins
impl Logins
Sourcepub fn new(timing: Timing, clock: Arc<dyn Fn() -> i64 + Send + Sync>) -> Self
pub fn new(timing: Timing, clock: Arc<dyn Fn() -> i64 + Send + Sync>) -> Self
Logins on timing, with clock (unix milliseconds) as now.
Sourcepub fn with_log(self, log: Log) -> Self
pub fn with_log(self, log: Log) -> Self
Send diagnostics (a login connected, failed, abandoned; never a
phone or a code) to log.
Sourcepub fn of(&self, person: &str, org: &str) -> Vec<Snapshot>
pub fn of(&self, person: &str, org: &str) -> Vec<Snapshot>
person’s logins of org in progress (and those just finished).
Sourcepub fn start(
self: &Arc<Self>,
person: &str,
org: &str,
phone: Secret,
driver: Box<dyn LoginDriver>,
done: OnDone,
) -> Result<Snapshot, LoginError>
pub fn start( self: &Arc<Self>, person: &str, org: &str, phone: Secret, driver: Box<dyn LoginDriver>, done: OnDone, ) -> Result<Snapshot, LoginError>
A new login of org by person with phone on driver: its
thread drives it; done keeps the session. One at a time per org.
§Errors
A bad phone, one in progress already, the send budget.
Sourcepub fn submit(
&self,
person: &str,
org: &str,
id: &str,
code: Secret,
) -> Result<Snapshot, LoginError>
pub fn submit( &self, person: &str, org: &str, id: &str, code: Secret, ) -> Result<Snapshot, LoginError>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Logins
impl !RefUnwindSafe for Logins
impl !UnwindSafe for Logins
impl Forget for Logins
impl Send for Logins
impl Sync for Logins
impl Unpin for Logins
impl UnsafeUnpin for Logins
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