[][src]Struct sgx_tstd::panic::AssertUnwindSafe

pub struct AssertUnwindSafe<T>(pub T);

A simple wrapper around a type to assert that it is unwind safe.

When using catch_unwind it may be the case that some of the closed over variables are not unwind safe. For example if &mut T is captured the compiler will generate a warning indicating that it is not unwind safe. It may not be the case, however, that this is actually a problem due to the specific usage of catch_unwind if unwind safety is specifically taken into account. This wrapper struct is useful for a quick and lightweight annotation that a variable is indeed unwind safe.

Trait Implementations

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

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

type Target = T

The resulting type after dereferencing.

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

impl<R, F: FnOnce() -> R> FnOnce() for AssertUnwindSafe<F>[src]

type Output = R

The returned type after the call operator is used.

impl<F: Future> Future for AssertUnwindSafe<F>[src]

type Output = F::Output

The type of value produced on completion.

impl<T> RefUnwindSafe for AssertUnwindSafe<T>[src]

impl<T> UnwindSafe for AssertUnwindSafe<T>[src]

Auto Trait Implementations

impl<T> Send for AssertUnwindSafe<T> where
    T: Send

impl<T> Sync for AssertUnwindSafe<T> where
    T: Sync

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

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

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

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.