pub trait Put<PB: ProtocolBehavior>: Stream<PB> + 'static {
// Required methods
fn progress(&mut self) -> Result<(), Error>;
fn reset(&mut self, new_name: AgentName) -> Result<(), Error>;
fn descriptor(&self) -> &AgentDescriptor;
fn describe_state(&self) -> &str;
fn is_state_successful(&self) -> bool;
fn shutdown(&mut self) -> String;
fn version() -> String
where Self: Sized;
}
Expand description
Generic trait used to define the interface with a concrete library implementing the protocol.
Required Methods§
sourcefn progress(&mut self) -> Result<(), Error>
fn progress(&mut self) -> Result<(), Error>
Process incoming buffer, internal progress, can fill in the output buffer
fn descriptor(&self) -> &AgentDescriptor
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