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<<<PB as ProtocolBehavior>::ProtocolTypes as ProtocolTypes>::PUTConfig>;
fn describe_state(&self) -> String;
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<<<PB as ProtocolBehavior>::ProtocolTypes as ProtocolTypes>::PUTConfig>
sourcefn describe_state(&self) -> String
fn describe_state(&self) -> String
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