pub trait Put<PB: ProtocolBehavior>: Stream<PB::Matcher, PB::ProtocolMessage, PB::OpaqueProtocolMessage, PB::OpaqueProtocolMessageFlight> + 'static {
fn progress(&mut self, agent_name: &AgentName) -> Result<(), Error>;
fn reset(&mut self, agent_name: AgentName) -> Result<(), Error>;
fn descriptor(&self) -> &AgentDescriptor;
fn rename_agent(&mut self, agent_name: AgentName) -> Result<(), Error>;
fn describe_state(&self) -> &str;
fn is_state_successful(&self) -> bool;
fn determinism_reseed(&mut self) -> Result<(), Error>;
fn shutdown(&mut self) -> String;
fn version() -> String
where
Self: Sized;
fn is_reusable_with(&self, other: &AgentDescriptor) -> bool { ... }
}
Expand description
Generic trait used to define the interface with a concrete library implementing the protocol.
Required Methods§
sourcefn progress(&mut self, agent_name: &AgentName) -> Result<(), Error>
fn progress(&mut self, agent_name: &AgentName) -> Result<(), Error>
Process incoming buffer, internal progress, can fill in the output buffer
fn descriptor(&self) -> &AgentDescriptor
sourcefn rename_agent(&mut self, agent_name: AgentName) -> Result<(), Error>
fn rename_agent(&mut self, agent_name: AgentName) -> Result<(), Error>
Propagate agent changes to the PUT
sourcefn describe_state(&self) -> &str
fn describe_state(&self) -> &str
Returns a textual representation of the state in which self is
sourcefn is_state_successful(&self) -> bool
fn is_state_successful(&self) -> bool
Checks whether the Put is in a good state
sourcefn determinism_reseed(&mut self) -> Result<(), Error>
fn determinism_reseed(&mut self) -> Result<(), Error>
Make the PUT used by self deterministic in the future by making its PRNG “deterministic”
Now subsumed by Factory-level functions to reseed globally: determinism_reseed
Provided Methods§
sourcefn is_reusable_with(&self, other: &AgentDescriptor) -> bool
fn is_reusable_with(&self, other: &AgentDescriptor) -> bool
checks whether a agent is reusable with the descriptor