Skip to main content

LinkedAccountsHost

Trait LinkedAccountsHost 

Source
pub trait LinkedAccountsHost {
    // Required methods
    fn accounts(&self) -> Vec<LinkedAccount>;
    fn revision(&self) -> u64;
    fn refresh(&self);
    fn link(&self, app: &str);
    fn unlink(&self, app: &str);

    // Provided methods
    fn profile_links(&self) -> Option<Vec<ProfileLink>> { ... }
    fn refresh_app(&self, app: &str) { ... }
    fn offer(&self, token: &str) { ... }
    fn accept(&self, app: &str) { ... }
    fn decline(&self, app: &str) { ... }
}
Expand description

What shows and changes a person’s linked accounts in a workspace. Asking never waits: what comes of it shows in Self::accounts once the workspace’s host answered, and Self::revision moves.

Required Methods§

Source

fn accounts(&self) -> Vec<LinkedAccount>

Every service the workspace is connected to, with the person’s account, as last heard.

Source

fn revision(&self) -> u64

Moves whenever Self::accounts changed.

Source

fn refresh(&self)

Ask again where every account stands.

Start linking the person’s account with app’s service: off to its consent page.

Unlink the person’s account with app’s service.

Provided Methods§

The person’s linked accounts as their profile names them; None until the workspace’s host answered where they stand.

Source

fn refresh_app(&self, app: &str)

Ask again where the account with app’s service stands.

Source

fn offer(&self, token: &str)

A link token came with the page: find the account it offers.

Source

fn accept(&self, app: &str)

Say yes to the account app’s service offers.

Source

fn decline(&self, app: &str)

Say no to it.

Implementors§