pub struct BufferRange {
pub allocation: Allocation,
pub size: u32,
}Expand description
A byte range inside a BufferPool’s buffer.
The range stays valid — and its data stays put — until its
allocation field is handed back with
BufferPool::release. Growing the pool replaces the buffer but keeps
every offset, so read the buffer from BufferPool::buffer instead of
holding one.
Fields§
§allocation: AllocationThe allocation that keeps the range reserved.
size: u32The size reserved for the range, in bytes.
Cached at allocation time so the handle stays self-contained: the allocator entry is the pool’s, and the pool may grow behind it.
Trait Implementations§
Source§impl Clone for BufferRange
impl Clone for BufferRange
impl Copy for BufferRange
Auto Trait Implementations§
impl Forget for BufferRange
impl Freeze for BufferRange
impl RefUnwindSafe for BufferRange
impl Send for BufferRange
impl Sync for BufferRange
impl Unpin for BufferRange
impl UnsafeUnpin for BufferRange
impl UnwindSafe for BufferRange
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more