Skip to main content

Session

Trait Session 

Source
pub trait Session<'d> {
    // Required methods
    fn receive(
        &mut self,
        input: Segments<'d>,
        output: &mut [u8],
        scratch: &mut Vec<u8>,
    ) -> (usize, Action<'d>);
    fn finish(
        &mut self,
        output: &mut [u8],
        scratch: &mut Vec<u8>,
    ) -> (usize, Action<'d>);
    fn activate(
        &mut self,
        output: &mut [u8],
        scratch: &mut Vec<u8>,
    ) -> (usize, Action<'d>);
}
Expand description

Established byte-stream owner retained without type erasure.

Required Methods§

Source

fn receive( &mut self, input: Segments<'d>, output: &mut [u8], scratch: &mut Vec<u8>, ) -> (usize, Action<'d>)

Source

fn finish( &mut self, output: &mut [u8], scratch: &mut Vec<u8>, ) -> (usize, Action<'d>)

Observes the peer’s orderly end of the input direction exactly once.

Source

fn activate( &mut self, output: &mut [u8], scratch: &mut Vec<u8>, ) -> (usize, Action<'d>)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'d> Session<'d> for Never