Skip to main content

decode_as_any

Function decode_as_any 

Source
fn decode_as_any<R>(
    stage: &MessageStage,
    codec: &mut ChannelCodec,
    src: &mut BytesMut,
) -> Result<Option<AnyChanCell>, Error>
where R: Into<AnyChanMsg> + ChanMsg,
Expand description

Helper function to decode a cell within a restricted msg set into an AnyChanCell.

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