usebytes::BytesMut;/// Trait of helper objects to write out messages as bytes.
pubtraitEncoder{/// The type of items consumed by the `Encoder`
typeItem;/// The type of encoding errors.
typeError:std::fmt::Debug;/// Encodes a frame into the buffer provided.
fnencode(&mutself,
item:Self::Item,
dst:&mut BytesMut,
)->Result<(), Self::Error>;}