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>,
}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 Hive offers beyond C0 1, e.g.
FEATURE_DEVICE_SETUP; empty (absent) on older ones.
Implementations§
Source§impl DeviceCodeV1
impl DeviceCodeV1
Sourcepub fn offers_device_setup(&self) -> bool
pub fn offers_device_setup(&self) -> bool
Whether this Hive takes POST /v1/device/setup for this code.
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 Freeze for DeviceCodeV1
impl RefUnwindSafe for DeviceCodeV1
impl Send for DeviceCodeV1
impl Sync for DeviceCodeV1
impl Unpin for DeviceCodeV1
impl UnsafeUnpin for DeviceCodeV1
impl UnwindSafe for DeviceCodeV1
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