[−][src]Struct alloc_wg::alloc::Global
The global memory allocator.
This type implements the allocation traits by forwarding calls
to the allocator registered with the #[global_allocator]
attribute
if there is one, or the std
crate’s default.
Trait Implementations
impl BuildAllocRef for Global
[src]
type Ref = Self
unsafe fn build_alloc_ref(
&mut self,
_ptr: NonNull<u8>,
_layout: Option<NonZeroLayout>
) -> Self::Ref
[src]
&mut self,
_ptr: NonNull<u8>,
_layout: Option<NonZeroLayout>
) -> Self::Ref
impl DeallocRef for Global
[src]
type BuildAlloc = Self
fn get_build_alloc(&mut self) -> Self::BuildAlloc
[src]
unsafe fn dealloc(&mut self, ptr: NonNull<u8>, layout: NonZeroLayout)
[src]
impl AllocRef for Global
[src]
type Error = AllocErr
fn alloc(&mut self, layout: NonZeroLayout) -> Result<NonNull<u8>, Self::Error>
[src]
fn alloc_zeroed(
&mut self,
layout: NonZeroLayout
) -> Result<NonNull<u8>, Self::Error>
[src]
&mut self,
layout: NonZeroLayout
) -> Result<NonNull<u8>, Self::Error>
fn usable_size(&self, layout: NonZeroLayout) -> (usize, usize)
[src]
unsafe fn grow_in_place(
&mut self,
ptr: NonNull<u8>,
layout: NonZeroLayout,
new_size: NonZeroUsize
) -> bool
[src]
&mut self,
ptr: NonNull<u8>,
layout: NonZeroLayout,
new_size: NonZeroUsize
) -> bool
unsafe fn shrink_in_place(
&mut self,
ptr: NonNull<u8>,
layout: NonZeroLayout,
new_size: NonZeroUsize
) -> bool
[src]
&mut self,
ptr: NonNull<u8>,
layout: NonZeroLayout,
new_size: NonZeroUsize
) -> bool
impl ReallocRef for Global
[src]
unsafe fn realloc(
&mut self,
ptr: NonNull<u8>,
old_layout: NonZeroLayout,
new_layout: NonZeroLayout
) -> Result<NonNull<u8>, Self::Error>
[src]
&mut self,
ptr: NonNull<u8>,
old_layout: NonZeroLayout,
new_layout: NonZeroLayout
) -> Result<NonNull<u8>, Self::Error>
impl Clone for Global
[src]
impl Copy for Global
[src]
impl Default for Global
[src]
impl Debug for Global
[src]
Auto Trait Implementations
impl Send for Global
impl Sync for Global
impl Unpin for Global
impl UnwindSafe for Global
impl RefUnwindSafe for Global
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,