pub struct AgentInfoSigned { /* private fields */ }Expand description
Signed agent information.
Implementations§
Source§impl AgentInfoSigned
impl AgentInfoSigned
Sourcepub async fn sign<S: Signer>(
signer: &S,
agent_info: AgentInfo,
) -> K2Result<Arc<Self>>
pub async fn sign<S: Signer>( signer: &S, agent_info: AgentInfo, ) -> K2Result<Arc<Self>>
Generate a signed agent info by signing an agent info.
Sourcepub fn decode<V: Verifier>(verifier: &V, encoded: &[u8]) -> K2Result<Arc<Self>>
pub fn decode<V: Verifier>(verifier: &V, encoded: &[u8]) -> K2Result<Arc<Self>>
Decode a canonical json encoding of a signed agent info.
Sourcepub fn decode_list<V: Verifier>(
verifier: &V,
encoded: &[u8],
) -> K2Result<Vec<K2Result<Arc<Self>>>>
pub fn decode_list<V: Verifier>( verifier: &V, encoded: &[u8], ) -> K2Result<Vec<K2Result<Arc<Self>>>>
Decode a canonical json encoding of a list of signed agent infos.
Sourcepub fn encode(&self) -> K2Result<String>
pub fn encode(&self) -> K2Result<String>
Get the canonical json encoding of this signed agent info.
Sourcepub fn get_agent_info(&self) -> &AgentInfo
pub fn get_agent_info(&self) -> &AgentInfo
Access the inner AgentInfo data. Note, you can instead just deref.
Sourcepub fn get_encoded(&self) -> &str
pub fn get_encoded(&self) -> &str
Access the canonical encoded inner agent info.
Sourcepub fn get_signature(&self) -> &Bytes
pub fn get_signature(&self) -> &Bytes
Access the signature over the encoded inner agent info.
Trait Implementations§
Source§impl Debug for AgentInfoSigned
impl Debug for AgentInfoSigned
Source§impl Deref for AgentInfoSigned
impl Deref for AgentInfoSigned
Source§impl Hash for AgentInfoSigned
impl Hash for AgentInfoSigned
Source§impl PartialEq for AgentInfoSigned
impl PartialEq for AgentInfoSigned
impl Eq for AgentInfoSigned
impl StructuralPartialEq for AgentInfoSigned
Auto Trait Implementations§
impl !Freeze for AgentInfoSigned
impl RefUnwindSafe for AgentInfoSigned
impl Send for AgentInfoSigned
impl Sync for AgentInfoSigned
impl Unpin for AgentInfoSigned
impl UnwindSafe for AgentInfoSigned
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