pub struct LocalDevice {
pub device_id: DeviceId,
pub user_id: UserId,
pub label: String,
pub created_at_ms: u64,
/* private fields */
}Expand description
Local device — owns its signing keypair. Never leaves the device that created it.
Fields§
§device_id: DeviceId§user_id: UserId§label: String§created_at_ms: u64Implementations§
Source§impl LocalDevice
impl LocalDevice
pub fn generate(user_id: UserId, label: String, now_ms: u64) -> Self
pub fn public_key(&self) -> VerifyingKey
pub fn info(&self, last_seen_ms: u64) -> DeviceInfo
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LocalDevice
impl RefUnwindSafe for LocalDevice
impl Send for LocalDevice
impl Sync for LocalDevice
impl Unpin for LocalDevice
impl UnsafeUnpin for LocalDevice
impl UnwindSafe for LocalDevice
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more