Type Alias smart_ptr::unique::Global

source ·
pub type Global<T> = Unique<'static, T, GlobalDeleter>;
Expand description

Alias to Unique with GlobalDeleter as second type parameter

Aliased Type§

struct Global<T> { /* private fields */ }

Implementations§

source§

impl<T> Global<T>

source

pub fn boxed(val: T) -> Self

Creates new instance using global allocator

source§

impl<T: ?Sized> Global<T>

source

pub fn into_boxed(self) -> Box<T>

Converts ptr to box

Trait Implementations§

source§

impl<T: ?Sized + Clone> Clone for Global<T>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: ?Sized> From<Box<T>> for Global<T>

source§

fn from(ptr: Box<T>) -> Self

Converts to this type from the input type.