Trait TryContainer

Source
pub trait TryContainer<T: ?Sized>: FragileTryContainer<T> { }
Expand description

An abstraction over some container which owns a T and can provide immutable references to it, or be consumed to return the inner T (if T is Sized).

§Errors

The into_inner and try_get_ref methods may be able to fail, depending on the container; a container should clearly document the circumstances in which a None or Err variant may be returned.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T: ?Sized> TryContainer<T> for Box<T>

Source§

impl<T: ?Sized> TryContainer<T> for Rc<T>

Source§

impl<T: ?Sized> TryContainer<T> for Arc<ThreadCheckedMutex<T>>

Source§

impl<T: ?Sized> TryContainer<T> for Arc<T>

Implementors§