Skip to main content

encode_as_any

Function encode_as_any 

Source
fn encode_as_any<R>(
    stage: &MessageStage,
    cell: AnyChanCell,
    codec: &mut ChannelCodec,
    dst: &mut BytesMut,
) -> Result<(), Error>
where R: ChanMsg + TryFrom<AnyChanMsg, Error = AnyChanMsg>,
Expand description

Helper function to encode an AnyChanCell cell that is within a restricted msg set R.

The given stage is used to know which error to return.