pub struct MAPIBuffer<'a, T>(/* private fields */)
where
T: Sized;Expand description
Wrapper type for an allocation in MAPIUninit which has been fully initialized.
Implementations§
Source§impl<'a, T> MAPIBuffer<'a, T>
impl<'a, T> MAPIBuffer<'a, T>
Sourcepub fn chain<P>(
&self,
count: usize,
) -> Result<MAPIUninit<'a, P>, MAPIAllocError>
pub fn chain<P>( &self, count: usize, ) -> Result<MAPIUninit<'a, P>, MAPIAllocError>
Create a new allocation with enough room for count elements of type P with a call to
sys::MAPIAllocateMore. The result is a separate allocation that is not freed until
self is dropped at the beginning of the chain.
You may call MAPIBuffer::chain on the result as well, they will both share a root
allocation created with MAPIUninit::new.
Sourcepub fn as_mut(&mut self) -> Result<&mut T, MAPIAllocError>
pub fn as_mut(&mut self) -> Result<&mut T, MAPIAllocError>
Access a single element of type T once it has been initialized with
MAPIUninit::assume_init.
Auto Trait Implementations§
impl<'a, T> Freeze for MAPIBuffer<'a, T>
impl<'a, T> RefUnwindSafe for MAPIBuffer<'a, T>where
T: RefUnwindSafe,
impl<'a, T> !Send for MAPIBuffer<'a, T>
impl<'a, T> !Sync for MAPIBuffer<'a, T>
impl<'a, T> Unpin for MAPIBuffer<'a, T>
impl<'a, T> UnwindSafe for MAPIBuffer<'a, T>where
T: RefUnwindSafe,
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