#[non_exhaustive]pub enum ConfirmationPolicy {
None,
ReviewCard,
ExplicitClick,
Reauthentication,
QualifiedSignature,
HumanProfessionalReview,
}Expand description
Confirmation a command requires before execution (spec §14.3).
New confirmation kinds are expected, so downstream matches need a wildcard arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
None
No confirmation.
ReviewCard
The user must review a diff card.
ExplicitClick
The user must click an explicit confirmation CTA.
Reauthentication
The user must re-authenticate.
QualifiedSignature
A qualified electronic signature is required.
HumanProfessionalReview
A qualified human other than the end user must review. No card the user can click satisfies it.
Implementations§
Source§impl ConfirmationPolicy
impl ConfirmationPolicy
Sourcepub fn interaction_kind(self) -> Option<InteractionKind>
pub fn interaction_kind(self) -> Option<InteractionKind>
The interaction kind whose answer satisfies this confirmation, if the end user can give it at all.
Self::HumanProfessionalReview returns None: the review is somebody
else’s, recorded through CommandOrigin::InternalPolicy or a verified
CommandOrigin::ExternalCallback, so offering the user a confirmation
card would let them approve themselves.
Sourcepub fn is_server_side_only(self) -> bool
pub fn is_server_side_only(self) -> bool
Returns true when only the server can supply the confirmation.
Trait Implementations§
Source§impl Clone for ConfirmationPolicy
impl Clone for ConfirmationPolicy
impl Copy for ConfirmationPolicy
Source§impl Debug for ConfirmationPolicy
impl Debug for ConfirmationPolicy
Source§impl<'de> Deserialize<'de> for ConfirmationPolicy
impl<'de> Deserialize<'de> for ConfirmationPolicy
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>,
impl Eq for ConfirmationPolicy
Source§impl Hash for ConfirmationPolicy
impl Hash for ConfirmationPolicy
Source§impl JsonSchema for ConfirmationPolicy
impl JsonSchema for ConfirmationPolicy
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Ord for ConfirmationPolicy
impl Ord for ConfirmationPolicy
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ConfirmationPolicy
impl PartialEq for ConfirmationPolicy
Source§impl PartialOrd for ConfirmationPolicy
impl PartialOrd for ConfirmationPolicy
Source§impl Serialize for ConfirmationPolicy
impl Serialize for ConfirmationPolicy
impl StructuralPartialEq for ConfirmationPolicy
Auto Trait Implementations§
impl Freeze for ConfirmationPolicy
impl RefUnwindSafe for ConfirmationPolicy
impl Send for ConfirmationPolicy
impl Sync for ConfirmationPolicy
impl Unpin for ConfirmationPolicy
impl UnsafeUnpin for ConfirmationPolicy
impl UnwindSafe for ConfirmationPolicy
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.