pub struct Global;
The global memory allocator.
This type implements the AllocRef
trait by forwarding calls to the allocator registered with the #[global_allocator]
attribute if there is one, or the std
crate’s default.
Note: while this type is unstable, the functionality it provides can be accessed through the free functions in alloc
.
impl AllocRef for Global
[src]
fn alloc(&mut self, layout: Layout) -> Result<NonNull<[u8]>, AllocErr>
[src]
fn alloc_zeroed(&mut self, layout: Layout) -> Result<NonNull<[u8]>, AllocErr>
[src]
unsafe fn dealloc(&mut self, ptr: NonNull<u8>, layout: Layout)
[src]
unsafe fn grow(
    &mut self,
    ptr: NonNull<u8>,
    layout: Layout,
    new_size: usize
) -> Result<NonNull<[u8]>, AllocErr>
[src]
unsafe fn grow_zeroed(
    &mut self,
    ptr: NonNull<u8>,
    layout: Layout,
    new_size: usize
) -> Result<NonNull<[u8]>, AllocErr>
[src]
unsafe fn shrink(
    &mut self,
    ptr: NonNull<u8>,
    layout: Layout,
    new_size: usize
) -> Result<NonNull<[u8]>, AllocErr>
[src]
fn by_ref(&mut self) -> &mut SelfⓘNotable traits for &'_ mut F
impl<'_, F> Future for &'_ mut F where
    F: Unpin + Future + ?Sized,Â
type Output = <F as Future>::Output;
impl<'_, I> Iterator for &'_ mut I where
    I: Iterator + ?Sized,Â
type Item = <I as Iterator>::Item;
impl<R:Â Read + ?Sized, '_> Read for &'_ mut R
impl<W:Â Write + ?Sized, '_> Write for &'_ mut W
[src]
impl Clone for Global
[src]
impl Copy for Global
[src]
impl Debug for Global
[src]
impl Default for Global
[src]
impl RefUnwindSafe for Global
impl Send for Global
impl Sync for Global
impl Unpin for Global
impl UnwindSafe for Global
impl<T> Any for T where
    T: 'static + ?Sized,Â
[src]
impl<T> Borrow<T> for T where
    T: ?Sized,Â
[src]
fn borrow(&self) -> &TⓘNotable traits for &'_ mut F
impl<'_, F> Future for &'_ mut F where
    F: Unpin + Future + ?Sized,Â
type Output = <F as Future>::Output;
impl<'_, I> Iterator for &'_ mut I where
    I: Iterator + ?Sized,Â
type Item = <I as Iterator>::Item;
impl<R:Â Read + ?Sized, '_> Read for &'_ mut R
impl<W:Â Write + ?Sized, '_> Write for &'_ mut W
[src]
impl<T> BorrowMut<T> for T where
    T: ?Sized,Â
[src]
fn borrow_mut(&mut self) -> &mut TⓘNotable traits for &'_ mut F
impl<'_, F> Future for &'_ mut F where
    F: Unpin + Future + ?Sized,Â
type Output = <F as Future>::Output;
impl<'_, I> Iterator for &'_ mut I where
    I: Iterator + ?Sized,Â
type Item = <I as Iterator>::Item;
impl<R:Â Read + ?Sized, '_> Read for &'_ mut R
impl<W:Â Write + ?Sized, '_> Write for &'_ mut W
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
    U: From<T>,Â
[src]
impl<T> ToOwned for T where
    T: Clone,Â
[src]
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]
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]
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/alloc/struct.Global.html