[−][src]Struct redox_buffer_pool::ExpandHandle
A handle for expansion. When this handle is retrieved by the BufferPool::begin_expand
method, the range has already been reserved, so it's up to this handle to initialize it.
Implementations
impl<'a, I, H, E> ExpandHandle<'a, I, H, E> where
I: Integer,
H: Handle,
E: Copy,
[src]
I: Integer,
H: Handle,
E: Copy,
pub fn len(&self) -> I
[src]
Get the length of the range that has been reserved for this specific allocation.
pub fn is_empty(&self) -> bool
[src]
Check whether the pending expansion consists of no bytes. Note that zero-sized allocations will panic anyways, so this will always return false, but is still there for completeness.
pub fn offset(&self) -> I
[src]
Get the offset within the buffer pool, where this allocation is to take place.
pub unsafe fn initialize(self, pointer: NonNull<u8>, extra: E)
[src]
Provide the handle with an actually allocated pointer, initializing the memory range within the buffer pool.
Safety
For this to be safe, the pointer must be a valid allocation (anywhere) of the size originally inputted. The allocation must have the static lifetime, so pointers to the stack obviously don't apply here.
Auto Trait Implementations
impl<'a, I, H, E> !RefUnwindSafe for ExpandHandle<'a, I, H, E>
impl<'a, I, H, E> Send for ExpandHandle<'a, I, H, E> where
H: Sync,
I: Send + Sync,
H: Sync,
I: Send + Sync,
impl<'a, I, H, E> Sync for ExpandHandle<'a, I, H, E> where
H: Sync,
I: Send + Sync,
H: Sync,
I: Send + Sync,
impl<'a, I, H, E> Unpin for ExpandHandle<'a, I, H, E> where
I: Unpin,
I: Unpin,
impl<'a, I, H, E> !UnwindSafe for ExpandHandle<'a, I, H, E>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,