pub struct AgentDescriptor { /* private fields */ }Implementations§
Source§impl AgentDescriptor
impl AgentDescriptor
Sourcepub const SIZE_BYTES: usize
pub const SIZE_BYTES: usize
Total size in bytes of the AgentDescriptor structure
pub fn new( instance_id: u32, manufacturer: &str, agent_name: &str, agent_version: u32, ) -> Result<Self, FeagiDataError>
Sourcepub fn instance_id(&self) -> u32
pub fn instance_id(&self) -> u32
Get the instance ID
Sourcepub fn manufacturer(&self) -> &str
pub fn manufacturer(&self) -> &str
Get the manufacturer name as a string slice (without null padding)
Sourcepub fn agent_name(&self) -> &str
pub fn agent_name(&self) -> &str
Get the agent name as a string slice (without null padding)
Sourcepub fn agent_version(&self) -> u32
pub fn agent_version(&self) -> u32
Get the agent version
Sourcepub fn manufacturer_bytes(&self) -> &[u8; 20]
pub fn manufacturer_bytes(&self) -> &[u8; 20]
Get the raw manufacturer bytes (including null padding)
Sourcepub fn agent_name_bytes(&self) -> &[u8; 20]
pub fn agent_name_bytes(&self) -> &[u8; 20]
Get the raw agent name bytes (including null padding)
Sourcepub fn from_bytes(bytes: &[u8; 48]) -> Result<Self, FeagiDataError>
pub fn from_bytes(bytes: &[u8; 48]) -> Result<Self, FeagiDataError>
Deserialize from a fixed-size byte array
Sourcepub fn try_from_base64(encoded: &str) -> Result<Self, FeagiDataError>
pub fn try_from_base64(encoded: &str) -> Result<Self, FeagiDataError>
Try to decode an AgentDescriptor from a base64 string
Trait Implementations§
Source§impl Clone for AgentDescriptor
impl Clone for AgentDescriptor
Source§fn clone(&self) -> AgentDescriptor
fn clone(&self) -> AgentDescriptor
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 AgentDescriptor
impl Debug for AgentDescriptor
Source§impl Hash for AgentDescriptor
impl Hash for AgentDescriptor
Source§impl PartialEq for AgentDescriptor
impl PartialEq for AgentDescriptor
impl Copy for AgentDescriptor
impl Eq for AgentDescriptor
impl StructuralPartialEq for AgentDescriptor
Auto Trait Implementations§
impl Freeze for AgentDescriptor
impl RefUnwindSafe for AgentDescriptor
impl Send for AgentDescriptor
impl Sync for AgentDescriptor
impl Unpin for AgentDescriptor
impl UnwindSafe for AgentDescriptor
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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§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
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more