pub struct ProtocolLimits {
pub max_packet_bytes: usize,
pub max_frame_bytes: usize,
pub max_response_bytes: usize,
pub max_columns: usize,
pub max_binds: usize,
pub max_batch_rows: usize,
pub max_object_depth: usize,
pub max_object_elements: usize,
pub max_vector_dimensions: usize,
pub max_lob_chunks: usize,
pub max_length_prefixed_elements: usize,
}Expand description
Central resource policy for thin protocol decoding.
The values are deliberately collected in one copyable struct so connection, packet, TTC, object, vector, LOB, and notification decoders all share the same vocabulary for resource bounds. W1-T5.2 threads this policy through the current decoder call graph; this type is the single source of those limits.
Fields§
§max_packet_bytes: usizeMaximum encoded TNS packet size.
max_frame_bytes: usizeMaximum decoded logical TTC frame/message size.
max_response_bytes: usizeMaximum cumulative bytes accepted for one server response.
max_columns: usizeMaximum number of columns in one describe/fetch shape.
max_binds: usizeMaximum bind count in one execute/batch request.
max_batch_rows: usizeMaximum row count in one client-side batch operation.
max_object_depth: usizeMaximum recursive object/JSON nesting depth.
max_object_elements: usizeMaximum element/member count in one decoded object/JSON container.
max_vector_dimensions: usizeMaximum VECTOR dimensions.
max_lob_chunks: usizeMaximum number of LOB chunks in one logical LOB operation.
max_length_prefixed_elements: usizeMaximum elements in generic length-prefixed wire collections.
Implementations§
Source§impl ProtocolLimits
impl ProtocolLimits
pub const DEFAULT: Self
Sourcepub fn validate(self) -> Result<Self>
pub fn validate(self) -> Result<Self>
Validate caller-supplied limits before attaching them to a connection.
pub fn check_packet_bytes(&self, observed: usize) -> Result<()>
pub fn check_frame_bytes(&self, observed: usize) -> Result<()>
pub fn check_response_bytes(&self, observed: usize) -> Result<()>
pub fn check_columns(&self, observed: usize) -> Result<()>
pub fn check_binds(&self, observed: usize) -> Result<()>
pub fn check_batch_rows(&self, observed: usize) -> Result<()>
pub fn check_object_depth(&self, observed: usize) -> Result<()>
pub fn check_object_elements(&self, observed: usize) -> Result<()>
pub fn check_vector_dimensions(&self, observed: usize) -> Result<()>
pub fn check_lob_chunks(&self, observed: usize) -> Result<()>
pub fn check_length_prefixed_elements(&self, observed: usize) -> Result<()>
Trait Implementations§
Source§impl Clone for ProtocolLimits
impl Clone for ProtocolLimits
Source§fn clone(&self) -> ProtocolLimits
fn clone(&self) -> ProtocolLimits
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ProtocolLimits
Source§impl Debug for ProtocolLimits
impl Debug for ProtocolLimits
Source§impl Default for ProtocolLimits
impl Default for ProtocolLimits
impl Eq for ProtocolLimits
Source§impl PartialEq for ProtocolLimits
impl PartialEq for ProtocolLimits
Source§fn eq(&self, other: &ProtocolLimits) -> bool
fn eq(&self, other: &ProtocolLimits) -> bool
self and other values to be equal, and is used by ==.