Struct github_device_flow::DeviceFlow
source · [−]pub struct DeviceFlow {
pub host: String,
pub client_id: String,
pub user_code: Option<String>,
pub device_code: Option<String>,
pub verification_uri: Option<String>,
pub state: DeviceFlowState,
}Fields
host: Stringclient_id: Stringuser_code: Option<String>device_code: Option<String>verification_uri: Option<String>state: DeviceFlowStateImplementations
sourceimpl DeviceFlow
impl DeviceFlow
pub fn new(client_id: &str, maybe_host: Option<&str>) -> Self
pub fn start(
client_id: &str,
maybe_host: Option<&str>
) -> Result<DeviceFlow, DeviceFlowError>
pub fn setup(&mut self)
pub fn poll(&mut self, iterations: u32) -> Result<Credential, DeviceFlowError>
pub fn update(&mut self)
Trait Implementations
sourceimpl Clone for DeviceFlow
impl Clone for DeviceFlow
sourcefn clone(&self) -> DeviceFlow
fn clone(&self) -> DeviceFlow
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
Auto Trait Implementations
impl RefUnwindSafe for DeviceFlow
impl Send for DeviceFlow
impl Sync for DeviceFlow
impl Unpin for DeviceFlow
impl UnwindSafe for DeviceFlow
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more