Trait puffin::put::Put

source ·
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§

Process incoming buffer, internal progress, can fill in the output buffer

In-place reset of the state

Propagate agent changes to the PUT

Returns a textual representation of the state in which self is

Checks whether the Put is in a good state

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

Shut down the PUT by consuming it and returning a string that summarizes the execution.

Returns a textual representation of the version of the PUT used by self

Provided Methods§

checks whether a agent is reusable with the descriptor

Implementors§