Struct cassandra_protocol::frame::frame_encoder::LegacyFrameEncoder   
source · pub struct LegacyFrameEncoder { /* private fields */ }Expand description
Pre-V5 frame encoder which simply encodes one envelope directly in the buffer.
Trait Implementations§
source§impl Clone for LegacyFrameEncoder
 
impl Clone for LegacyFrameEncoder
source§fn clone(&self) -> LegacyFrameEncoder
 
fn clone(&self) -> LegacyFrameEncoder
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moresource§impl Debug for LegacyFrameEncoder
 
impl Debug for LegacyFrameEncoder
source§impl Default for LegacyFrameEncoder
 
impl Default for LegacyFrameEncoder
source§fn default() -> LegacyFrameEncoder
 
fn default() -> LegacyFrameEncoder
Returns the “default value” for a type. Read more
source§impl FrameEncoder for LegacyFrameEncoder
 
impl FrameEncoder for LegacyFrameEncoder
source§fn can_fit(&self, _len: usize) -> bool
 
fn can_fit(&self, _len: usize) -> bool
Determines if payload of given size can fit in current frame buffer.
source§fn add_envelope(&mut self, envelope: Vec<u8>)
 
fn add_envelope(&mut self, envelope: Vec<u8>)
Adds a self-contained envelope to current frame.
source§fn finalize_self_contained(&mut self) -> &[u8] ⓘ
 
fn finalize_self_contained(&mut self) -> &[u8] ⓘ
Finalizes a self-contained encoded frame in the buffer.
source§fn finalize_non_self_contained(&mut self, envelope: &[u8]) -> (usize, &[u8])
 
fn finalize_non_self_contained(&mut self, envelope: &[u8]) -> (usize, &[u8])
Appends a large envelope and finalizes non self-contained encoded frame in the buffer.
Copies as much envelope data as possible and returns new envelope buffer start.
source§fn has_envelopes(&self) -> bool
 
fn has_envelopes(&self) -> bool
Checks if current frame contains any envelopes.