pub trait SerializableRequest {
const OPCODE: RequestOpcode;
// Required method
fn serialize(
&self,
buf: &mut Vec<u8>,
) -> Result<(), CqlRequestSerializationError>;
// Provided method
fn to_bytes(&self) -> Result<Bytes, CqlRequestSerializationError> { ... }
}
Expand description
Requests that can be serialized into a CQL frame.
Required Associated Constants§
Sourceconst OPCODE: RequestOpcode
const OPCODE: RequestOpcode
Opcode of the request, used to identify the request type in the CQL frame.
Required Methods§
Provided Methods§
Sourcefn to_bytes(&self) -> Result<Bytes, CqlRequestSerializationError>
fn to_bytes(&self) -> Result<Bytes, CqlRequestSerializationError>
Serializes the request into a heap-allocated Bytes
object.
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.