pub struct PendingLogin {
pub kind: PendingKind,
pub cdp_base: String,
pub browser_context_id: String,
pub target_id: String,
pub created_at: i64,
pub expires_at: i64,
pub phone_masked: String,
pub channel_requested: Channel,
pub channel_sent: Option<String>,
}Expand description
State kept between --phone … and --otp / --poll. No secrets:
ids of the isolated context/tab in the browser and a masked phone.
Fields§
§kind: PendingKind§cdp_base: String§browser_context_id: String§target_id: String§created_at: i64§expires_at: i64§phone_masked: String§channel_requested: Channel§channel_sent: Option<String>Delivery Grab reported on the page (SMS, WhatsApp, app), if known.
Implementations§
Source§impl PendingLogin
impl PendingLogin
pub fn path() -> Result<PathBuf>
Sourcepub fn read_from(path: &Path) -> Result<Option<Self>>
pub fn read_from(path: &Path) -> Result<Option<Self>>
The saved pending login, expired or not; None if there is none.
pub fn read() -> Result<Option<Self>>
pub fn save_to(&self, path: &Path) -> Result<()>
pub fn save(&self) -> Result<()>
pub fn clear() -> Result<()>
pub fn is_expired(&self, now: i64) -> bool
Sourcepub fn next_command(&self) -> &'static str
pub fn next_command(&self) -> &'static str
The --json document for a pending login: otp_sent or
approval_pending, with the command that finishes it.
pub fn summary(&self, now: i64) -> Value
Trait Implementations§
Source§impl Clone for PendingLogin
impl Clone for PendingLogin
Source§impl Debug for PendingLogin
impl Debug for PendingLogin
Source§impl<'de> Deserialize<'de> for PendingLogin
impl<'de> Deserialize<'de> for PendingLogin
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 PendingLogin
impl RefUnwindSafe for PendingLogin
impl Send for PendingLogin
impl Sync for PendingLogin
impl Unpin for PendingLogin
impl UnsafeUnpin for PendingLogin
impl UnwindSafe for PendingLogin
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