Struct xlang_abi::traits::DynRef

source ·
#[repr(C)]
pub struct DynRef<'lt, T: ?Sized + AbiSafeTrait> { /* private fields */ }
Expand description

An Abi safe wrapper arround a shared reference to a trait object

Implementations

Derefences x inside a pin

Unsizes a shared reference into a DynRef to T

Trait Implementations

Allocates memory suitable for layout, and returns a pointer to it, or None if an error occurs. The value of the memory accessed via the pointer is uninitialized Read more
Deallocates Memory obtained from a call to Allocator::allocate with the given layout Read more
Allocates memory suitable for layout, and returns a pointer to it, or None if an error occurs. Each byte pointed to by the return value up to layout.size() is 0 Read more
Grows an allocation given by ptr and old_layout, copying the data from the old allocation into the new allocation. ptr may not be used to access memory after a call to this function. It is unsound to call grow on core::pin::Pinned memory Read more
Grows an allocation given by ptr and old_layout, copying the data from the old allocation into the new allocation. ptr may not be used to access memory after a call to this function. It is unsound to call grow_zeroed on core::pin::Pinned memory Read more
Grows an allocation given by ptr and old_layout, copying the data from the old allocation into the new allocation. ptr may not be used to access memory after a call to this function. It is unsound to call shrink on core::pin::Pinned memory Read more
Returns exactly self
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
The resulting type after dereferencing.
Dereferences the value.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.