#[non_exhaustive]pub enum LinkCallback {
DeviceCode {
device_code: String,
interval: u64,
expires_in: u64,
},
#[non_exhaustive] Redirect {
params: BTreeMap<String, String>,
member: Option<String>,
},
}Expand description
Completion input for a link. Debug redacts the device code, as for
LinkStep.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
DeviceCode
Poll a device flow to completion.
Fields
§
device_code: StringFrom LinkStep::DeviceCode.
§
interval: u64From LinkStep::DeviceCode.
§
expires_in: u64From LinkStep::DeviceCode; polling stops at this deadline.
#[non_exhaustive]Redirect
An authorisation-code redirect. Build it with
LinkCallback::redirect.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
Implementations§
Source§impl LinkCallback
impl LinkCallback
Sourcepub fn redirect(
params: BTreeMap<String, String>,
member: impl Into<String>,
) -> LinkCallback
pub fn redirect( params: BTreeMap<String, String>, member: impl Into<String>, ) -> LinkCallback
An authorisation-code redirect for member, the DID the caller
passed to crate::Forge::begin_account_link.
Sourcepub fn from_device_step(step: &LinkStep) -> Option<LinkCallback>
pub fn from_device_step(step: &LinkStep) -> Option<LinkCallback>
The callback that polls the device flow step started. None for a
step that is not a device flow.
Trait Implementations§
Source§impl Clone for LinkCallback
impl Clone for LinkCallback
Source§impl Debug for LinkCallback
impl Debug for LinkCallback
Source§impl<'de> Deserialize<'de> for LinkCallback
impl<'de> Deserialize<'de> for LinkCallback
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 LinkCallback
Source§impl PartialEq for LinkCallback
impl PartialEq for LinkCallback
Source§impl Serialize for LinkCallback
impl Serialize for LinkCallback
impl StructuralPartialEq for LinkCallback
Auto Trait Implementations§
impl Freeze for LinkCallback
impl RefUnwindSafe for LinkCallback
impl Send for LinkCallback
impl Sync for LinkCallback
impl Unpin for LinkCallback
impl UnsafeUnpin for LinkCallback
impl UnwindSafe for LinkCallback
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