pub struct Arsc<T: ?Sized, A: Allocator = Global> { /* private fields */ }Implementations§
source§impl<T, A: Allocator> Arsc<T, A>
impl<T, A: Allocator> Arsc<T, A>
pub fn try_new_in(data: T, alloc: A) -> Result<Self, AllocError>
pub fn try_new_uninit_in( alloc: A ) -> Result<Arsc<MaybeUninit<T>, A>, AllocError>
source§impl<T> Arsc<T, Global>
impl<T> Arsc<T, Global>
pub fn try_new(data: T) -> Result<Self, AllocError>
pub fn new(data: T) -> Self
pub fn pin(data: T) -> Pin<Self>
pub fn try_new_uninit() -> Result<Arsc<MaybeUninit<T>, Global>, AllocError>
pub fn try_unwrap(this: Self) -> Result<T, Self>
source§impl<T, A: Allocator> Arsc<MaybeUninit<T>, A>
impl<T, A: Allocator> Arsc<MaybeUninit<T>, A>
sourcepub unsafe fn assume_init(this: Self) -> Arsc<T, A>
pub unsafe fn assume_init(this: Self) -> Arsc<T, A>
Safety
The caller must ensure a valid value of T stored in the Arsc.
source§impl<T> Arsc<T, Global>
impl<T> Arsc<T, Global>
pub fn into_raw(this: Self) -> *const T
sourcepub unsafe fn from_raw(ptr: *const T) -> Self
pub unsafe fn from_raw(ptr: *const T) -> Self
Safety
The raw pointer must have been previously returned by a call to
Arsc<U>::into_raw where U must have the same size and
alignment as T. This is trivially true if U is T.
Note that if U is not T but has the same size and alignment, this is
basically like transmuting references of different types. See
mem::transmute for more information on what
restrictions apply in this case.
Trait Implementations§
source§impl<T: ?Sized + Ord, A: Allocator> Ord for Arsc<T, A>
impl<T: ?Sized + Ord, A: Allocator> Ord for Arsc<T, A>
source§impl<T: ?Sized + PartialEq, A: Allocator> PartialEq<Arsc<T, A>> for Arsc<T, A>
impl<T: ?Sized + PartialEq, A: Allocator> PartialEq<Arsc<T, A>> for Arsc<T, A>
source§impl<T: ?Sized + PartialOrd, A: Allocator> PartialOrd<Arsc<T, A>> for Arsc<T, A>
impl<T: ?Sized + PartialOrd, A: Allocator> PartialOrd<Arsc<T, A>> for Arsc<T, A>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read more