pub struct Agent<PB: ProtocolBehavior> {
name: AgentName,
put: Box<dyn Put<PB>>,
put_descriptor: PutDescriptor,
}
Expand description
An Agent
holds a non-cloneable reference to a Stream.
Fields§
§name: AgentName
§put: Box<dyn Put<PB>>
§put_descriptor: PutDescriptor
Implementations§
source§impl<PB: ProtocolBehavior> Agent<PB>
impl<PB: ProtocolBehavior> Agent<PB>
pub fn new(
context: &TraceContext<PB>,
agent_descriptor: &AgentDescriptor
) -> Result<Self, Error>
pub fn descriptor(&self) -> &PutDescriptor
pub fn rename(&mut self, new_name: AgentName) -> Result<(), Error>
pub fn reset(&mut self, agent_name: AgentName) -> Result<(), Error>
pub fn name(&self) -> AgentName
pub fn put(&self) -> &dyn Put<PB>
pub fn put_mut(&mut self) -> &mut dyn Put<PB>
Trait Implementations§
source§impl<PB: ProtocolBehavior> Debug for Agent<PB>
impl<PB: ProtocolBehavior> Debug for Agent<PB>
Auto Trait Implementations§
impl<PB> !RefUnwindSafe for Agent<PB>
impl<PB> !Send for Agent<PB>
impl<PB> !Sync for Agent<PB>
impl<PB> Unpin for Agent<PB>
impl<PB> !UnwindSafe for Agent<PB>
Blanket Implementations§
§impl<Tail, T> Prepend<T> for Tail
impl<Tail, T> Prepend<T> for Tail
§type PreprendResult = Tail
type PreprendResult = Tail
The Resulting [
TupleList
], of an [Prepend::prepend()
] call,
including the prepended entry.