pub trait Codec: 'static {
type ConnState: Default + 'static;
const IS_PLAIN: bool = false;
// Provided methods
fn is_active(_state: &Self::ConnState) -> bool { ... }
fn process_inbound(_state: &mut Self::ConnState, _wire_in: &[u8]) -> usize { ... }
fn take_plaintext(_state: &mut Self::ConnState) -> Vec<u8> ⓘ { ... }
fn install_plaintext(_state: &mut Self::ConnState, _plaintext: Vec<u8>) { ... }
fn process_outbound(_state: &mut Self::ConnState, _plaintext_in: &[u8]) { ... }
fn wire_slice(_state: &Self::ConnState) -> &[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 close_pending(_state: &Self::ConnState) -> bool { ... }
}Provided Associated Constants§
Required Associated Types§
Provided Methods§
fn is_active(_state: &Self::ConnState) -> bool
fn process_inbound(_state: &mut Self::ConnState, _wire_in: &[u8]) -> usize
fn take_plaintext(_state: &mut Self::ConnState) -> Vec<u8> ⓘ
fn install_plaintext(_state: &mut Self::ConnState, _plaintext: Vec<u8>)
fn process_outbound(_state: &mut Self::ConnState, _plaintext_in: &[u8])
fn wire_slice(_state: &Self::ConnState) -> &[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 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", so this trait is not object safe.