pub struct AgentID { /* private fields */ }Expand description
Agent identifier: 48-byte AgentDescriptor (instance_id(4) + manufacturer(20) + agent_name(20) + version(4)). Single format - no 8-byte legacy.
Implementations§
Source§impl AgentID
impl AgentID
pub const NUMBER_BYTES: usize = FeagiByteContainer::AGENT_ID_BYTE_COUNT
pub fn new(bytes: [u8; 48]) -> Self
pub const fn new_blank() -> Self
pub fn new_random() -> Self
Sourcepub fn try_from_base64(base64_str: &str) -> Result<Self, FeagiNetworkError>
pub fn try_from_base64(base64_str: &str) -> Result<Self, FeagiNetworkError>
pub fn is_blank(&self) -> bool
pub fn bytes(&self) -> &[u8; 48]
Trait Implementations§
Source§impl AgentIdentifier for AgentID
impl AgentIdentifier for AgentID
fn get_identifier_bytes(&self) -> &[u8; 48]
Source§impl<'de> Deserialize<'de> for AgentID
impl<'de> Deserialize<'de> for AgentID
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
impl Copy for AgentID
impl Eq for AgentID
impl StructuralPartialEq for AgentID
Auto Trait Implementations§
impl Freeze for AgentID
impl RefUnwindSafe for AgentID
impl Send for AgentID
impl Sync for AgentID
impl Unpin for AgentID
impl UnsafeUnpin for AgentID
impl UnwindSafe for AgentID
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<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