pub struct GpbBuffer { /* private fields */ }Expand description
High-performance buffer for GPB operations with SIMD alignment.
Implementations§
Source§impl GpbBuffer
impl GpbBuffer
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Create a new buffer with specified capacity.
Sourcepub fn set_position(&mut self, pos: usize) -> Result<(), GpbError>
pub fn set_position(&mut self, pos: usize) -> Result<(), GpbError>
Set the position for reading/writing.
Sourcepub fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
pub fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
Get mutable byte slice for writing.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GpbBuffer
impl RefUnwindSafe for GpbBuffer
impl Send for GpbBuffer
impl Sync for GpbBuffer
impl Unpin for GpbBuffer
impl UnwindSafe for GpbBuffer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more