Skip to main content

encode_cell

Function encode_cell 

Source
pub(super) fn encode_cell(
    chan_type: ChannelType,
    stage: &MessageStage,
    cell: AnyChanCell,
    codec: &mut ChannelCodec,
    dst: &mut BytesMut,
) -> Result<(), Error>
Expand description

Encode a given cell which can contains any type of messages. It is filtered through its restricted message set at encoding time.

Return an error if encoding fails or if cell is disallowed.