pub(crate) trait CreateHandshakeWrap {
// Required methods
fn to_chanmsg(&self, bytes: Vec<u8>) -> AnyChanMsg;
fn decode_chanmsg(&self, msg: CreateResponse) -> Result<Vec<u8>>;
}Expand description
An object that can put a given handshake into a ChanMsg for a CREATE* cell, and unwrap a CREATED* cell.
Required Methods§
Sourcefn to_chanmsg(&self, bytes: Vec<u8>) -> AnyChanMsg
fn to_chanmsg(&self, bytes: Vec<u8>) -> AnyChanMsg
Construct an appropriate ChanMsg to hold this kind of handshake.
Sourcefn decode_chanmsg(&self, msg: CreateResponse) -> Result<Vec<u8>>
fn decode_chanmsg(&self, msg: CreateResponse) -> Result<Vec<u8>>
Decode a ChanMsg to an appropriate handshake value, checking its type.