Struct safer_ffi::boxed::Box[][src]

#[repr(transparent)]
pub struct Box<T>(_);
This is supported on crate feature alloc only.
Expand description

Same as Box<T>, (e.g., same #[repr(C)] layout), but with no non-aliasing guarantee.

C Layout

Implementations

impl<T> Box<T>[src]

pub fn new(value: T) -> Self[src]

pub fn into(self: Box<T>) -> Box<T>[src]

Trait Implementations

impl<T: Debug> Debug for Box<T>[src]

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<T> Deref for Box<T>[src]

type Target = T

The resulting type after dereferencing.

fn deref(self: &Box<T>) -> &T[src]

Dereferences the value.

impl<T> DerefMut for Box<T>[src]

fn deref_mut(self: &mut Box<T>) -> &mut T[src]

Mutably dereferences the value.

impl<T> Drop for Box<T>[src]

fn drop(self: &mut Box<T>)[src]

Executes the destructor for this type. Read more

impl<T> From<Box<T, Global>> for Box<T>[src]

fn from(boxed: Box<T>) -> Box<T>[src]

Performs the conversion.

impl<T> ReprC for Box<T> where
    NonNullOwned<T>: ReprC
[src]

type CLayout = <NonNullOwned<T> as ReprC>::CLayout

The CType having the same layout as Self.

fn is_valid(it: &Self::CLayout) -> bool[src]

Sanity checks that can be performed on an instance of the CType layout. Read more

impl<T> Send for Box<T> where
    Box<T>: Send
[src]

impl<T> Sync for Box<T> where
    Box<T>: Sync
[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Box<T> where
    T: RefUnwindSafe

impl<T> Unpin for Box<T> where
    T: Unpin

impl<T> UnwindSafe for Box<T> where
    T: RefUnwindSafe + UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ManuallyDropMut for T[src]

type Ret = ManuallyDrop<T>

pub fn manually_drop_mut(&'__ mut self) -> &'__ mut ManuallyDrop<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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.