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§
fn receive( &mut self, input: Segments<'d>, output: &mut [u8], scratch: &mut Vec<u8>, ) -> (usize, Action<'d>)
Sourcefn finish(
&mut self,
output: &mut [u8],
scratch: &mut Vec<u8>,
) -> (usize, Action<'d>)
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.
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".