#[non_exhaustive]pub enum AuthMethod {
Terminal(AuthMethodTerminal),
Agent(AuthMethodAgent),
Other(OtherAuthMethod),
}unstable_protocol_v2 only.Expand description
Describes an available authentication method.
The type field acts as the discriminator in the serialized JSON form.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Terminal(AuthMethodTerminal)
Client runs the configured agent program as a separate interactive
process, without passing this method to auth/login.
Agent(AuthMethodAgent)
Agent handles authentication itself through auth/login.
The type discriminator value is agent.
Other(OtherAuthMethod)
Custom or future authentication method.
Values beginning with _ are reserved for implementation-specific
extensions. Unknown values that do not begin with _ are reserved for
future ACP variants.
Clients that do not understand this method type should preserve the raw payload when storing, replaying, proxying, or forwarding initialization data, and otherwise ignore the method or display it generically.
Implementations§
Source§impl AuthMethod
impl AuthMethod
Sourcepub fn method_id(&self) -> &AuthMethodId
pub fn method_id(&self) -> &AuthMethodId
The unique identifier for this authentication method.
Sourcepub fn description(&self) -> Option<&str>
pub fn description(&self) -> Option<&str>
Optional description providing more details about this authentication method.
Sourcepub fn meta(&self) -> Option<&Meta>
pub fn meta(&self) -> Option<&Meta>
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
Trait Implementations§
Source§impl Clone for AuthMethod
impl Clone for AuthMethod
Source§fn clone(&self) -> AuthMethod
fn clone(&self) -> AuthMethod
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AuthMethod
impl Debug for AuthMethod
Source§impl<'de> Deserialize<'de> for AuthMethod
impl<'de> Deserialize<'de> for AuthMethod
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 AuthMethod
Source§impl JsonSchema for AuthMethod
Available on crate feature schemars only.
impl JsonSchema for AuthMethod
schemars only.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 PartialEq for AuthMethod
impl PartialEq for AuthMethod
Source§impl Serialize for AuthMethod
impl Serialize for AuthMethod
impl StructuralPartialEq for AuthMethod
Auto Trait Implementations§
impl Freeze for AuthMethod
impl RefUnwindSafe for AuthMethod
impl Send for AuthMethod
impl Sync for AuthMethod
impl Unpin for AuthMethod
impl UnsafeUnpin for AuthMethod
impl UnwindSafe for AuthMethod
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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§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.