pub struct DeviceCodeV1 {
pub schema: String,
pub device_code: String,
pub user_code: String,
pub verification_uri: String,
pub verification_uri_complete: String,
pub interval: u32,
pub expires_in: u32,
pub features: Vec<String>,
pub intent: Option<DeviceIntent>,
pub plan: Option<TrialPlan>,
}Expand description
Response of POST /v1/device/code.
Fields§
§schema: String§device_code: StringSecret polling handle; never shown or logged.
user_code: StringShort code the user confirms in the browser, e.g. WDJB-MJHT.
verification_uri: String§verification_uri_complete: String§interval: u32Minimum seconds between token polls.
expires_in: u32Seconds until device_code expires.
features: Vec<String>C0 2.1: what this Cloud offers beyond C0 1, e.g.
FEATURE_DEVICE_SETUP; empty (absent) on older ones.
intent: Option<DeviceIntent>One-step trial: the Cloud echoes the request’s intent and plan
(device_code_trial.response.json); absent for a sign-in.
plan: Option<TrialPlan>Implementations§
Source§impl DeviceCodeV1
impl DeviceCodeV1
Sourcepub fn starts_trial(&self, plan: TrialPlan) -> bool
pub fn starts_trial(&self, plan: TrialPlan) -> bool
Whether this code starts the trial of plan the request asked for.
Sourcepub fn offers_device_setup(&self) -> bool
pub fn offers_device_setup(&self) -> bool
Whether this Cloud takes POST /v1/device/setup for this code.
Sourcepub fn offers_app_keys(&self) -> bool
pub fn offers_app_keys(&self) -> bool
Whether this Cloud binds app keys in the device flow (f3129 S2+S3). Without it the engine announces, offers and binds none.
Source§impl DeviceCodeV1
impl DeviceCodeV1
pub fn validate(&self) -> Result<(), ValidationError>
Trait Implementations§
Source§impl Clone for DeviceCodeV1
impl Clone for DeviceCodeV1
Source§impl Debug for DeviceCodeV1
impl Debug for DeviceCodeV1
Source§impl<'de> Deserialize<'de> for DeviceCodeV1
impl<'de> Deserialize<'de> for DeviceCodeV1
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for DeviceCodeV1
Source§impl PartialEq for DeviceCodeV1
impl PartialEq for DeviceCodeV1
Source§impl Serialize for DeviceCodeV1
impl Serialize for DeviceCodeV1
impl StructuralPartialEq for DeviceCodeV1
Auto Trait Implementations§
impl Forget for DeviceCodeV1
impl Freeze for DeviceCodeV1
impl Move for DeviceCodeV1
impl RefUnwindSafe for DeviceCodeV1
impl Send for DeviceCodeV1where
RawVecInner: Send,
impl Sync for DeviceCodeV1where
RawVecInner: Sync,
impl Unpin for DeviceCodeV1
impl UnsafeUnpin for DeviceCodeV1where
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for DeviceCodeV1where
RawVecInner: UnwindSafe,
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