ps_buffer/lib.rs
1#![allow(clippy::module_name_repetitions)]
2
3pub use constants::*;
4pub use error::BufferError;
5pub use shared::SharedBuffer;
6pub use traits::*;
7
8mod constants;
9mod error;
10mod implementations;
11mod methods;
12mod shared;
13mod traits;
14
15#[must_use]
16pub struct Buffer {
17 /// This is a raw pointer to this Buffer's data.
18 ptr: *mut u8,
19 /// Buffer's allocated capacity in bytes.
20 capacity: usize,
21 /// Buffer length in bytes.
22 length: usize,
23}
24
25unsafe impl Send for Buffer {}
26unsafe impl Sync for Buffer {}