pub struct Resource<T: Send + Sync + 'static> { /* private fields */ }Expand description
A process resource retained across calls and explicitly closed at normal shutdown.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for Resource<T>
impl<T> !Sync for Resource<T>
impl<T> !UnwindSafe for Resource<T>
impl<T> Forget for Resource<T>
impl<T> Freeze for Resource<T>where
*const ArcInner<T> is !null: Freeze,
PhantomData<ArcInner<T>>: Freeze,
*const dyn FnOnce(Arc<T>) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send>> + Send is !null: Freeze,
PhantomData<dyn FnOnce(Arc<T>) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send>> + Send>: Freeze,
impl<T> Move for Resource<T>
impl<T> Send for Resource<T>
impl<T> Unpin for Resource<T>
impl<T> UnsafeUnpin for Resource<T>where
*const ArcInner<T> is !null: UnsafeUnpin,
PhantomData<ArcInner<T>>: UnsafeUnpin,
*const dyn FnOnce(Arc<T>) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send>> + Send is !null: UnsafeUnpin,
PhantomData<dyn FnOnce(Arc<T>) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send>> + Send>: UnsafeUnpin,
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