pub struct GoogleSignIn { /* private fields */ }Expand description
A sign-in waiting for the browser.
Implementations§
Source§impl GoogleSignIn
impl GoogleSignIn
Sourcepub async fn start(config: GoogleDesktopConfig) -> Result<Self>
pub async fn start(config: GoogleDesktopConfig) -> Result<Self>
Listens on the loopback and builds the authorization URL.
The URL to open in the browser.
Sourcepub fn redirect_uri(&self) -> &str
pub fn redirect_uri(&self) -> &str
http://127.0.0.1:<port>.
pub fn canceller(&self) -> SignInCanceller
Sourcepub async fn finish(self) -> Result<GoogleTokens>
pub async fn finish(self) -> Result<GoogleTokens>
Waits for the browser redirect, then exchanges the code for tokens. Fails with
Error::Timeout after the configured timeout, Error::Cancelled when
cancelled, and Error::SignIn when Google or the user refused, or the
redirect does not carry this sign-in’s state.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for GoogleSignIn
impl Forget for GoogleSignIn
impl Move for GoogleSignIn
impl RefUnwindSafe for GoogleSignInwhere
PollEvented<TcpListener>: RefUnwindSafe,
Atomic<usize>: RefUnwindSafe,
RwLock<bool>: RefUnwindSafe,
AtomicUsize: RefUnwindSafe,
Notify: RefUnwindSafe,
impl Send for GoogleSignIn
impl Sync for GoogleSignIn
impl Unpin for GoogleSignIn
impl UnsafeUnpin for GoogleSignInwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
I32NotAllOnes: UnsafeUnpin,
Align8<usize>: UnsafeUnpin,
*const ArcInner<Handle> is !null: UnsafeUnpin,
PhantomData<ArcInner<Handle>>: UnsafeUnpin,
*const ArcInner<ScheduledIo> is !null: UnsafeUnpin,
PhantomData<ArcInner<ScheduledIo>>: UnsafeUnpin,
*const ArcInner<Sender<bool>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Sender<bool>>>: UnsafeUnpin,
impl UnwindSafe for GoogleSignIn
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