pub struct DeviceCode {
pub id: Uuid,
pub device_code_hash: String,
pub user_code_hash: String,
pub user_code: String,
pub client_id: String,
pub scope: String,
pub expires_at: DateTime<Utc>,
pub interval_secs: u32,
pub authorized: bool,
pub denied: bool,
pub user_id: Option<Uuid>,
pub last_polled_at: Option<DateTime<Utc>>,
}Fields§
§id: Uuid§device_code_hash: StringSHA-256 of the device_code sent to the device.
user_code_hash: StringSHA-256 of the user_code shown on the device.
user_code: StringThe raw user_code (short, human-typeable — e.g. “BDWD-HQPK”).
client_id: String§scope: String§expires_at: DateTime<Utc>§interval_secs: u32§denied: bool§user_id: Option<Uuid>§last_polled_at: Option<DateTime<Utc>>Trait Implementations§
Source§impl Clone for DeviceCode
impl Clone for DeviceCode
Source§fn clone(&self) -> DeviceCode
fn clone(&self) -> DeviceCode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeviceCode
impl Debug for DeviceCode
Source§impl<'de> Deserialize<'de> for DeviceCode
impl<'de> Deserialize<'de> for DeviceCode
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
Auto Trait Implementations§
impl Freeze for DeviceCode
impl RefUnwindSafe for DeviceCode
impl Send for DeviceCode
impl Sync for DeviceCode
impl Unpin for DeviceCode
impl UnsafeUnpin for DeviceCode
impl UnwindSafe for DeviceCode
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