pub trait ChanMsg {
// Required methods
fn cmd(&self) -> ChanCmd;
fn encode_onto<W: Writer + ?Sized>(self, w: &mut W) -> EncodeResult<()>;
fn decode_from_reader(cmd: ChanCmd, r: &mut Reader<'_>) -> Result<Self>
where Self: Sized;
}
Expand description
Trait implemented by anything that can serve as a channel message.
Typically, this will be AnyChanMsg
(to represent an unrestricted relay
message), or some restricted subset of those messages.
Required Methods§
sourcefn encode_onto<W: Writer + ?Sized>(self, w: &mut W) -> EncodeResult<()>
fn encode_onto<W: Writer + ?Sized>(self, w: &mut W) -> EncodeResult<()>
Write the body of this message (not including length or command).
Object Safety§
This trait is not object safe.