#[non_exhaustive]pub struct AuthEnvVar {
pub name: String,
pub label: Option<String>,
pub secret: bool,
pub optional: bool,
pub meta: Option<Meta>,
}Expand description
UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
Describes a single environment variable for an AuthMethodEnvVar authentication method.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringThe environment variable name (e.g. "OPENAI_API_KEY").
label: Option<String>Human-readable label for this variable, displayed in client UI.
secret: boolWhether this value is a secret (e.g. API key, token). Clients should use a password-style input for secret vars.
Defaults to true.
optional: boolWhether this variable is optional.
Defaults to false.
meta: 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
Implementations§
Source§impl AuthEnvVar
impl AuthEnvVar
Sourcepub fn new(name: impl Into<String>) -> Self
Available on crate feature unstable_auth_methods only.
pub fn new(name: impl Into<String>) -> Self
unstable_auth_methods only.Creates a new auth env var.
Sourcepub fn label(self, label: impl IntoOption<String>) -> Self
Available on crate feature unstable_auth_methods only.
pub fn label(self, label: impl IntoOption<String>) -> Self
unstable_auth_methods only.Human-readable label for this variable, displayed in client UI.
Sourcepub fn secret(self, secret: bool) -> Self
Available on crate feature unstable_auth_methods only.
pub fn secret(self, secret: bool) -> Self
unstable_auth_methods only.Whether this value is a secret (e.g. API key, token). Clients should use a password-style input for secret vars.
Sourcepub fn optional(self, optional: bool) -> Self
Available on crate feature unstable_auth_methods only.
pub fn optional(self, optional: bool) -> Self
unstable_auth_methods only.Whether this variable is optional.
Sourcepub fn meta(self, meta: impl IntoOption<Meta>) -> Self
Available on crate feature unstable_auth_methods only.
pub fn meta(self, meta: impl IntoOption<Meta>) -> Self
unstable_auth_methods only.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 AuthEnvVar
impl Clone for AuthEnvVar
Source§fn clone(&self) -> AuthEnvVar
fn clone(&self) -> AuthEnvVar
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 AuthEnvVar
impl Debug for AuthEnvVar
Source§impl<'de> Deserialize<'de> for AuthEnvVar
impl<'de> Deserialize<'de> for AuthEnvVar
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 AuthEnvVar
Source§impl IntoV2 for AuthEnvVar
Available on crate features unstable_auth_methods and unstable_protocol_v2 only.
impl IntoV2 for AuthEnvVar
unstable_auth_methods and unstable_protocol_v2 only.Source§impl JsonSchema for AuthEnvVar
impl JsonSchema for AuthEnvVar
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 AuthEnvVar
impl PartialEq for AuthEnvVar
Source§fn eq(&self, other: &AuthEnvVar) -> bool
fn eq(&self, other: &AuthEnvVar) -> bool
self and other values to be equal, and is used by ==.