Skip to main content

WatchedSignIn

Struct WatchedSignIn 

Source
pub struct WatchedSignIn { /* private fields */ }
Expand description

The same sign-in, watched rather than inherited: an app has no terminal to hand over, so it reads what the tool prints and can type a fallback code back where the tool asks for one.

Implementations§

Source§

impl WatchedSignIn

Source

pub fn provider(&self) -> ProviderId

Which tool’s sign-in this is.

Source

pub fn said(&self) -> Said

What the tool says, for a reader on a thread of its own that must not hold up a paste or a cancel while it waits.

Source

pub fn paste(&mut self, line: &str) -> Result<()>

Types a line back, for a code the tool asks to be pasted when the browser cannot reach its callback.

Source

pub fn finish(self) -> Result<SignIn>

Waits for it to finish and hands back the login it stored.

Source

pub fn cancel(self)

Stops it. What it may have written is discarded by SignIn’s own cleanup.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.