Trait unsafe_unwrap::UnsafeUnwrap [] [src]

pub trait UnsafeUnwrap<T> {
    unsafe fn unsafe_unwrap(self) -> T;
}

A type whose instances can be unsafely unwrapped without checking.

Calling unsafe_unwrap() over unwrap() should remove panicking code related to checked unwrapping in optimized builds.

Required Methods

Unsafely moves the inner value out of self without checking.

Safety

This method trades safety for performance. Only use it when a wrapped value is known to exist. Otherwise, use unwrap() or pattern matching.

Implementors