Skip to main content

Crate secbuf

Crate secbuf 

Source
Expand description

§High-Performance Buffer Library

A zero-copy, lock-free buffer management library optimized for network protocols, data serialization, and high-throughput applications.

Features:

  • Secure memory zeroing using zeroize crate (compiler-resistant)
  • Connection-scoped lifecycle management with automatic cleanup on drop
  • Zero-copy circular buffers for streaming I/O
  • Thread-safe buffer pooling with lock-free design
  • Optional SIMD acceleration for bulk operations
  • Automatic secure erasure on connection termination (mimics Dropbear behavior)

Re-exports§

pub use buffer::Buffer;
pub use circular::CircularBuffer;
pub use connection::ConnectionBufferConfig;
pub use connection::ConnectionBuffers;
pub use connection::PooledConnectionBuffers;
pub use error::BufferError;
pub use error::Result;
pub use pool::BufferPool;
pub use pool::FastBufferPool;
pub use pool::FastPoolStats;
pub use pool::FastPooledBuffer;
pub use pool::PoolConfig;
pub use pool::PoolStats;
pub use pool::PooledBuffer;

Modules§

buffer
High-performance buffer implementation
circular
Circular (ring) buffer for streaming data
connection
Connection-scoped buffer lifecycle management.
error
Error types for buffer operations with advanced conversion support
pool
Buffer pool implementation with multiple modes.
prelude
Commonly used imports.

Macros§

buffer_op
Convenience macro for converting buffer operations to any Result type.
buffer_try
Try a buffer operation with automatic error conversion