pub trait DeviceSignIn: Send + Sync {
// Required methods
fn device_start(&self, client: &str, from: &str) -> Result<(String, String)>;
fn device_info(&self, user_code: &str) -> Option<DeviceRequest>;
fn device_approve(
&self,
who: &Who,
user_code: &str,
approve: bool,
) -> Result<()>;
fn device_poll(&self, device_code: &str) -> Result<DevicePoll>;
}Expand description
Command-line sign-in approved in the browser: the command starts it and polls, a signed-in member approves it, and the command receives a personal access token.
Required Methods§
Sourcefn device_start(&self, client: &str, from: &str) -> Result<(String, String)>
fn device_start(&self, client: &str, from: &str) -> Result<(String, String)>
A device code for the command and a short code for the member to confirm.
fn device_info(&self, user_code: &str) -> Option<DeviceRequest>
fn device_approve( &self, who: &Who, user_code: &str, approve: bool, ) -> Result<()>
fn device_poll(&self, device_code: &str) -> Result<DevicePoll>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".