Skip to main content

CreateHandshakeWrap

Trait CreateHandshakeWrap 

Source
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§

Source

fn to_chanmsg(&self, bytes: Vec<u8>) -> AnyChanMsg

Construct an appropriate ChanMsg to hold this kind of handshake.

Source

fn decode_chanmsg(&self, msg: CreateResponse) -> Result<Vec<u8>>

Decode a ChanMsg to an appropriate handshake value, checking its type.

Implementors§