#[repr(transparent)]
pub struct VirtualPtr<DynTrait: ?Sized + ReprCTrait>(_);
Available on crate feature dyn-traits only.
Expand description

Implementations§

source§

impl VirtualPtr<dyn FfiFutureExecutor + 'static>

source

pub fn spawn_within_tokio_reactor<R: 'static + Send>( &self, fut: impl 'static + Send + Future<Output = R> ) -> impl Future<Output = R>

Available on crate features futures and tokio only.
source

pub fn spawn<R: 'static + Send>( &self, fut: impl 'static + Send + Future<Output = R> ) -> impl Future<Output = R>

Available on crate feature futures only.
source

pub fn spawn_blocking<R: 'static + Send>( &self, action: impl 'static + Send + FnOnce() -> R ) -> impl Future<Output = Result<R, Canceled>>

Available on crate feature futures only.
source

pub fn block_on_within_tokio_reactor<R>( &self, fut: impl Future<Output = R> ) -> R

Available on crate features futures and tokio only.
source

pub fn block_on<R>(&self, fut: impl Future<Output = R>) -> R

Available on crate feature futures only.
source

pub fn enter(&self) -> impl '_ + Sized

Available on crate feature futures only.

“Enters” a context within which certain executor-specific Handle::current()-functionalities shall work properly.

source§

impl VirtualPtr<dyn FfiFutureExecutor + Send + Sync + 'static>

source

pub fn spawn_within_tokio_reactor<R: 'static + Send>( &self, fut: impl 'static + Send + Future<Output = R> ) -> impl Future<Output = R>

Available on crate features futures and tokio only.
source

pub fn spawn<R: 'static + Send>( &self, fut: impl 'static + Send + Future<Output = R> ) -> impl Future<Output = R>

Available on crate feature futures only.
source

pub fn spawn_blocking<R: 'static + Send>( &self, action: impl 'static + Send + FnOnce() -> R ) -> impl Future<Output = Result<R, Canceled>>

Available on crate feature futures only.
source

pub fn block_on_within_tokio_reactor<R>( &self, fut: impl Future<Output = R> ) -> R

Available on crate features futures and tokio only.
source

pub fn block_on<R>(&self, fut: impl Future<Output = R>) -> R

Available on crate feature futures only.
source

pub fn enter(&self) -> impl '_ + Sized

Available on crate feature futures only.

“Enters” a context within which certain executor-specific Handle::current()-functionalities shall work properly.

source§

impl VirtualPtr<dyn FfiFuture + '_>

source

pub async fn into_future(self)

Available on crate feature futures only.
source§

impl VirtualPtr<dyn Send + FfiFuture + '_>

source

pub async fn into_future(self)

Available on crate feature futures only.
source§

impl<DynTrait: ?Sized + ReprCTrait> VirtualPtr<DynTrait>

source

pub unsafe fn from_raw_parts( ptr: NonNullOwned<Erased>, vtable: DynTrait::VTable ) -> VirtualPtr<DynTrait>

source

pub fn __ptr(self: &VirtualPtr<DynTrait>) -> NonNull<Erased>

source

pub fn __vtable<'vtable>(self: &VirtualPtr<DynTrait>) -> &DynTrait::VTable

Trait Implementations§

source§

impl<DynTrait: ?Sized + DynClone> Clone for VirtualPtr<DynTrait>

source§

fn clone(self: &VirtualPtr<DynTrait>) -> VirtualPtr<DynTrait>

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<DynTrait: ?Sized + ReprCTrait> Debug for VirtualPtr<DynTrait>

source§

fn fmt(self: &VirtualPtr<DynTrait>, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<DynTrait: ?Sized + ReprCTrait> Drop for VirtualPtr<DynTrait>

source§

fn drop(self: &mut VirtualPtr<DynTrait>)

Executes the destructor for this type. Read more
source§

impl<'__usability> FfiFuture for VirtualPtr<dyn FfiFuture + '__usability>

Available on crate feature futures only.
source§

fn dyn_poll(self: Pin<&mut Self>, __arg1: &mut Context<'_>) -> PollFuture

source§

impl<'__usability> FfiFuture for VirtualPtr<dyn Send + FfiFuture + '__usability>

Available on crate feature futures only.
source§

fn dyn_poll(self: Pin<&mut Self>, __arg1: &mut Context<'_>) -> PollFuture

source§

impl<'__usability> FfiFuture for VirtualPtr<dyn Send + Sync + FfiFuture + '__usability>

Available on crate feature futures only.
source§

fn dyn_poll(self: Pin<&mut Self>, __arg1: &mut Context<'_>) -> PollFuture

source§

impl<'__usability> FfiFutureExecutor for VirtualPtr<dyn FfiFutureExecutor + '__usability>

Available on crate feature futures only.
source§

fn dyn_spawn( &self, __arg1: VirtualPtr<dyn Send + FfiFuture + 'static> ) -> VirtualPtr<dyn Send + FfiFuture + 'static>

source§

fn dyn_spawn_blocking( &self, __arg1: Box<dyn Send + FnMut() + 'static> ) -> VirtualPtr<dyn Send + FfiFuture + 'static>

source§

fn dyn_block_on(&self, __arg1: VirtualPtr<dyn FfiFuture + '_>)

source§

fn dyn_enter(&self) -> VirtualPtr<dyn DropGlue + '_>

source§

impl<'__usability> FfiFutureExecutor for VirtualPtr<dyn Send + Sync + FfiFutureExecutor + '__usability>

Available on crate feature futures only.
source§

fn dyn_spawn( &self, __arg1: VirtualPtr<dyn Send + FfiFuture + 'static> ) -> VirtualPtr<dyn Send + FfiFuture + 'static>

source§

fn dyn_spawn_blocking( &self, __arg1: Box<dyn Send + FnMut() + 'static> ) -> VirtualPtr<dyn Send + FfiFuture + 'static>

source§

fn dyn_block_on(&self, __arg1: VirtualPtr<dyn FfiFuture + '_>)

source§

fn dyn_enter(&self) -> VirtualPtr<dyn DropGlue + '_>

source§

impl<'r, T, DynTrait> From<&'r T> for VirtualPtr<DynTrait>where DynTrait: ?Sized + VirtualPtrFrom<&'r T>,

source§

fn from(it: &'r T) -> VirtualPtr<DynTrait>

Converts to this type from the input type.
source§

impl<'r, T, DynTrait> From<&'r mut T> for VirtualPtr<DynTrait>where DynTrait: ?Sized + VirtualPtrFrom<&'r mut T>,

source§

fn from(it: &'r mut T) -> VirtualPtr<DynTrait>

Converts to this type from the input type.
source§

impl<T, DynTrait> From<Arc<T>> for VirtualPtr<DynTrait>where DynTrait: ?Sized + VirtualPtrFrom<Arc<T>>,

Available on crate feature std only.
source§

fn from(it: Arc<T>) -> VirtualPtr<DynTrait>

Converts to this type from the input type.
source§

impl<T, DynTrait> From<Box<T, Global>> for VirtualPtr<DynTrait>where DynTrait: ?Sized + VirtualPtrFrom<Box<T>>,

Available on crate feature alloc only.
source§

fn from(it: Box<T>) -> VirtualPtr<DynTrait>

Converts to this type from the input type.
source§

impl<'r, T, DynTrait> From<Pin<&'r T>> for VirtualPtr<DynTrait>where DynTrait: ?Sized + VirtualPtrFrom<Pin<&'r T>>,

source§

fn from(it: Pin<&'r T>) -> VirtualPtr<DynTrait>

Converts to this type from the input type.
source§

impl<'r, T, DynTrait> From<Pin<&'r mut T>> for VirtualPtr<DynTrait>where DynTrait: ?Sized + VirtualPtrFrom<Pin<&'r mut T>>,

source§

fn from(it: Pin<&'r mut T>) -> VirtualPtr<DynTrait>

Converts to this type from the input type.
source§

impl<T, DynTrait> From<Pin<Box<T, Global>>> for VirtualPtr<DynTrait>where DynTrait: ?Sized + VirtualPtrFrom<Pin<Box<T>>>,

Available on crate feature alloc only.
source§

fn from(it: Pin<Box<T>>) -> VirtualPtr<DynTrait>

Converts to this type from the input type.
source§

impl<T, DynTrait> From<Rc<T>> for VirtualPtr<DynTrait>where DynTrait: ?Sized + VirtualPtrFrom<Rc<T>>,

Available on crate feature alloc only.
source§

fn from(it: Rc<T>) -> VirtualPtr<DynTrait>

Converts to this type from the input type.
source§

impl<DynTrait: ?Sized + ReprCTrait> ReprC for VirtualPtr<DynTrait>where VirtualPtr_<NonNullOwned<Erased>, DynTrait::VTable>: ReprC,

§

type CLayout = <VirtualPtr_<NonNullOwned<Erased>, <DynTrait as ReprCTrait>::VTable> as ReprC>::CLayout

The CType having the same layout as Self.
source§

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

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

impl<'__usability> DropGlue for VirtualPtr<dyn DropGlue + '__usability>

source§

impl<'__usability> DropGlue for VirtualPtr<dyn Send + DropGlue + '__usability>

source§

impl<'__usability> DropGlue for VirtualPtr<dyn Send + Sync + DropGlue + '__usability>

source§

impl<DynTrait> Send for VirtualPtr<DynTrait>where DynTrait: Send + ?Sized + ReprCTrait,

source§

impl<'__usability> StaticDropGlue for VirtualPtr<dyn Send + StaticDropGlue + '__usability>

source§

impl<'__usability> StaticDropGlue for VirtualPtr<dyn Send + Sync + StaticDropGlue + '__usability>

source§

impl<'__usability> StaticDropGlue for VirtualPtr<dyn StaticDropGlue + '__usability>

source§

impl<DynTrait> Sync for VirtualPtr<DynTrait>where DynTrait: Sync + ?Sized + ReprCTrait,

Auto Trait Implementations§

§

impl<DynTrait: ?Sized> RefUnwindSafe for VirtualPtr<DynTrait>where <DynTrait as ReprCTrait>::VTable: RefUnwindSafe,

§

impl<DynTrait: ?Sized> Unpin for VirtualPtr<DynTrait>where <DynTrait as ReprCTrait>::VTable: Unpin,

§

impl<DynTrait: ?Sized> UnwindSafe for VirtualPtr<DynTrait>where <DynTrait as ReprCTrait>::VTable: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CompatExt for T

source§

fn compat(self) -> Compat<T>

Applies the Compat adapter by value. Read more
source§

fn compat_ref(&self) -> Compat<&T>

Applies the Compat adapter by shared reference. Read more
source§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the Compat adapter by mutable reference. Read more
source§

impl<T> FitForCBox for T

§

type CBoxWrapped = Box_<T>

Available on crate feature alloc only.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> ManuallyDropMut for T

§

type Ret = ManuallyDrop<T>

source§

fn manually_drop_mut<'__>(&'__ mut self) -> &'__ mut ManuallyDrop<T>

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

impl<T> UpcastAny for Twhere T: 'static,

source§

fn upcast_any(&self) -> &(dyn Any + 'static)

Available on crate feature headers only.