pub trait ContextStack {
    type Name: ?Sized;
    type Buffer;

    fn pre_read(&mut self) -> Result<(), Error>;
    fn on_read_data(
        &mut self,
        msg: &SerializedMessage<'_, Self::Name, Self::Buffer>
    ) -> Result<(), Error>; fn post_read(&mut self, bytes: u32) -> Result<(), Error>; fn pre_write(&mut self) -> Result<(), Error>; fn on_write_data(
        &mut self,
        msg: &SerializedMessage<'_, Self::Name, Self::Buffer>
    ) -> Result<(), Error>; fn post_write(&mut self, bytes: u32) -> Result<(), Error>; }

Required Associated Types§

Type for method names

Type for buffers

Required Methods§

Called before the request is read.

Called before post_read after reading arguments (server) / after reading reply (client), with the actual (unparsed, serialized) data.

Called after the request is read.

Called before a response is written.

Called before post_write, after serializing response (server) / after serializing request (client), with the actual (serialized) data.

Called after a response a written.

Implementors§