pub(super) fn pick<'a>(
state: &AppState,
accounts: &'a [IdentityAccount],
wanted: &str,
skip: &[String],
provider: &str,
) -> Result<&'a IdentityAccount, SwitchError>Expand description
Name one account among accounts (one provider’s): by stable id, by local
id or label, by email when exactly one account of that email has quota, or
"any with quota". skip holds the accounts an agent is already on, which
any with quota does not pick. The refusal lists what the caller could use, and says which
kind it is: no such account, a name several share, or none with quota now.