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

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> UnwindSafe for AssertUnwindSafe<T>
[src]

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

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

The resulting type after dereferencing.

Dereferences the value.

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

Mutably dereferences the value.

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

The returned type after the call operator is used.

🔬 This is a nightly-only experimental API. (fn_traits)

Performs the call operation.

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

Formats the value using the given formatter. Read more

Auto Trait Implementations

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

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