pub struct BoxedDisposal<'dis>(/* private fields */);Expand description
Type-erased disposal for multi-threaded builds to handle this problem https://stackoverflow.com/q/46620790/9315497
Implementations§
Source§impl<'dis> BoxedDisposal<'dis>
impl<'dis> BoxedDisposal<'dis>
pub fn new(disposal: impl Disposable + MaybeSend + 'dis) -> Self
Trait Implementations§
Source§impl Debug for BoxedDisposal<'_>
impl Debug for BoxedDisposal<'_>
Source§impl Disposable for BoxedDisposal<'_>
impl Disposable for BoxedDisposal<'_>
Auto Trait Implementations§
impl<'dis> !RefUnwindSafe for BoxedDisposal<'dis>
impl<'dis> !Sync for BoxedDisposal<'dis>
impl<'dis> !UnwindSafe for BoxedDisposal<'dis>
impl<'dis> Freeze for BoxedDisposal<'dis>
impl<'dis> Send for BoxedDisposal<'dis>
impl<'dis> Unpin for BoxedDisposal<'dis>
impl<'dis> UnsafeUnpin for BoxedDisposal<'dis>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<D> DisposableExt for Dwhere
D: Disposable,
impl<D> DisposableExt for Dwhere
D: Disposable,
fn into_boxed<'dis>(self) -> BoxedDisposal<'dis>where
Self: MaybeSend + 'dis,
Source§fn into_subscription<D>(self) -> Subscription<D>where
D: Disposable + From<Self>,
fn into_subscription<D>(self) -> Subscription<D>where
D: Disposable + From<Self>,
Converts this disposal into a subscription whose inner disposal is
created through
From.