pub struct AuthRequiredMetadata {
pub auth_url: String,
pub auth_scheme: String,
pub scopes: Vec<String>,
pub description: String,
}Expand description
Conventional metadata payload used when a task enters TASK_STATE_AUTH_REQUIRED.
Fields§
§auth_url: StringAuthorization URL the user should visit.
auth_scheme: StringAuthentication scheme, such as oauth2 or apiKey.
scopes: Vec<String>Scopes requested by the agent.
description: StringHuman-readable explanation for the authorization request.
Implementations§
Source§impl AuthRequiredMetadata
impl AuthRequiredMetadata
Sourcepub fn from_metadata(metadata: &JsonObject) -> Result<Self, A2AError>
pub fn from_metadata(metadata: &JsonObject) -> Result<Self, A2AError>
Parse the convention from a metadata object.
Sourcepub fn into_metadata(self) -> Result<JsonObject, A2AError>
pub fn into_metadata(self) -> Result<JsonObject, A2AError>
Convert the convention into a message metadata object.
Trait Implementations§
Source§impl Clone for AuthRequiredMetadata
impl Clone for AuthRequiredMetadata
Source§fn clone(&self) -> AuthRequiredMetadata
fn clone(&self) -> AuthRequiredMetadata
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AuthRequiredMetadata
impl Debug for AuthRequiredMetadata
Source§impl<'de> Deserialize<'de> for AuthRequiredMetadata
impl<'de> Deserialize<'de> for AuthRequiredMetadata
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
Source§impl PartialEq for AuthRequiredMetadata
impl PartialEq for AuthRequiredMetadata
Source§impl Serialize for AuthRequiredMetadata
impl Serialize for AuthRequiredMetadata
impl Eq for AuthRequiredMetadata
impl StructuralPartialEq for AuthRequiredMetadata
Auto Trait Implementations§
impl Freeze for AuthRequiredMetadata
impl RefUnwindSafe for AuthRequiredMetadata
impl Send for AuthRequiredMetadata
impl Sync for AuthRequiredMetadata
impl Unpin for AuthRequiredMetadata
impl UnsafeUnpin for AuthRequiredMetadata
impl UnwindSafe for AuthRequiredMetadata
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