Trait InitialState

Source
pub trait InitialState {
    // Required method
    fn init(prologue: Option<Vec<u8>>) -> ProtocolResult<Self>
       where Self: Sized;
}
Expand description

A trait for protocol initial states.

Required Methods§

Source

fn init(prologue: Option<Vec<u8>>) -> ProtocolResult<Self>
where Self: Sized,

Initializes the state given initialization data in prologue.

Errors on invalid initialization data.

Implementors§