pub enum AgentTarget {
ById(AgentId),
ByType(AgentType),
}Expand description
Target for a message or delegation: either a specific agent by ID or any agent of a given type.
Variants§
Implementations§
Source§impl AgentTarget
impl AgentTarget
Sourcepub fn as_agent_id(&self) -> Option<AgentId>
pub fn as_agent_id(&self) -> Option<AgentId>
Agent ID when target is ById, otherwise None.
Sourcepub fn as_agent_type(&self) -> Option<&AgentType>
pub fn as_agent_type(&self) -> Option<&AgentType>
Agent type when target is ByType, otherwise None.
Trait Implementations§
Source§impl Clone for AgentTarget
impl Clone for AgentTarget
Source§fn clone(&self) -> AgentTarget
fn clone(&self) -> AgentTarget
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 ComposeSchema for AgentTarget
impl ComposeSchema for AgentTarget
Source§impl Debug for AgentTarget
impl Debug for AgentTarget
Source§impl<'de> Deserialize<'de> for AgentTarget
impl<'de> Deserialize<'de> for AgentTarget
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 Hash for AgentTarget
impl Hash for AgentTarget
Source§impl PartialEq for AgentTarget
impl PartialEq for AgentTarget
Source§impl Serialize for AgentTarget
impl Serialize for AgentTarget
Source§impl ToSchema for AgentTarget
impl ToSchema for AgentTarget
impl Eq for AgentTarget
impl StructuralPartialEq for AgentTarget
Auto Trait Implementations§
impl Freeze for AgentTarget
impl RefUnwindSafe for AgentTarget
impl Send for AgentTarget
impl Sync for AgentTarget
impl Unpin for AgentTarget
impl UnwindSafe for AgentTarget
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.