pub trait CodecLayer: 'static {
type ConnState: Default + 'static;
type Staging: WriteBufStorage;
const IS_PASSTHROUGH: bool;
// Required methods
fn is_active(state: &Self::ConnState) -> bool;
fn process_inbound(state: &mut Self::ConnState, wire_in: &[u8]);
fn process_outbound(state: &mut Self::ConnState, plaintext_in: &[u8]);
fn take_plaintext(state: &mut Self::ConnState) -> Vec<u8> ⓘ;
fn install_plaintext(state: &mut Self::ConnState, plaintext: Vec<u8>);
fn take_inflight(state: &mut Self::ConnState) -> Option<(*const u8, u32)>;
fn consume_inflight(state: &mut Self::ConnState, n: usize) -> bool;
fn has_inflight(state: &Self::ConnState) -> bool;
fn wire_slice(state: &Self::ConnState) -> &[u8] ⓘ;
fn close_pending(state: &Self::ConnState) -> bool;
}Required Associated Constants§
const IS_PASSTHROUGH: bool
Required Associated Types§
Required Methods§
fn is_active(state: &Self::ConnState) -> bool
fn process_inbound(state: &mut Self::ConnState, wire_in: &[u8])
fn process_outbound(state: &mut Self::ConnState, plaintext_in: &[u8])
fn take_plaintext(state: &mut Self::ConnState) -> Vec<u8> ⓘ
fn install_plaintext(state: &mut Self::ConnState, plaintext: Vec<u8>)
fn take_inflight(state: &mut Self::ConnState) -> Option<(*const u8, u32)>
fn consume_inflight(state: &mut Self::ConnState, n: usize) -> bool
fn has_inflight(state: &Self::ConnState) -> bool
fn wire_slice(state: &Self::ConnState) -> &[u8] ⓘ
fn close_pending(state: &Self::ConnState) -> bool
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".