pub struct AppKeyOffers<'a> {
pub chat: Option<&'a ChatKeyOffer>,
pub task: Option<&'a TaskKeyOffer>,
pub optin: Option<&'a OptinKeyOffer>,
}Expand description
The keys LeanCTX Code may hand over with a pairing: its chat key
(rc4-32), its task-propose key (rc4-67) and its opt-in key (rc4-16), any
of them or none (Default).
Fields§
§chat: Option<&'a ChatKeyOffer>§task: Option<&'a TaskKeyOffer>§optin: Option<&'a OptinKeyOffer>Implementations§
Source§impl AppKeyOffers<'_>
impl AppKeyOffers<'_>
Sourcepub fn announcements(self) -> Vec<AppKeyAnnouncementV1>
pub fn announcements(self) -> Vec<AppKeyAnnouncementV1>
The app_keys of POST /v1/device/code (f3129 S2): one entry per
offered kind, sorted by kind; empty when nothing is offered.
Sourcepub fn require_capability(self, code: &DeviceCodeV1) -> Result<(), CloudError>
pub fn require_capability(self, code: &DeviceCodeV1) -> Result<(), CloudError>
The announcement goes with the device-code request, before its
answer; the offers and their bind signature go out only when that
answer lists device_app_keys (app-key-bind-v1 §1). Otherwise
nothing is bound and the pairing stops before anything is polled.
Sourcepub fn verify(self, store: &CloudStore) -> Result<(), CloudError>
pub fn verify(self, store: &CloudStore) -> Result<(), CloudError>
The offers’ bind check against this computer’s instance keys (made here if there are none yet, as the pairing would), for the connect to run before it contacts the Cloud at all: a bind that does not verify stops the connect before the device code is fetched or the browser opened (§46.3 point 1, §28a). Loads nothing when no key is offered.
Trait Implementations§
Source§impl<'a> Clone for AppKeyOffers<'a>
impl<'a> Clone for AppKeyOffers<'a>
impl<'a> Copy for AppKeyOffers<'a>
Source§impl<'a> Debug for AppKeyOffers<'a>
impl<'a> Debug for AppKeyOffers<'a>
Auto Trait Implementations§
impl<'a> Forget for AppKeyOffers<'a>
impl<'a> Freeze for AppKeyOffers<'a>
impl<'a> Move for AppKeyOffers<'a>
impl<'a> RefUnwindSafe for AppKeyOffers<'a>
impl<'a> Send for AppKeyOffers<'a>
impl<'a> Sync for AppKeyOffers<'a>
impl<'a> Unpin for AppKeyOffers<'a>
impl<'a> UnsafeUnpin for AppKeyOffers<'a>
impl<'a> UnwindSafe for AppKeyOffers<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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