Skip to main content

OwnedRetriever

Trait OwnedRetriever 

Source
pub trait OwnedRetriever<U: Send + 'static> {
    // Required methods
    fn view<T, F: FnOnce(&U) -> T>(
        &self,
        f: F,
    ) -> Result<T, PoisonedThreadError>;
    fn unwrap(self) -> Result<U, PoisonedThreadError>;
}

Required Methods§

Source

fn view<T, F: FnOnce(&U) -> T>(&self, f: F) -> Result<T, PoisonedThreadError>

Source

fn unwrap(self) -> Result<U, PoisonedThreadError>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<U: Send + 'static> OwnedRetriever<U> for Arc<RwLock<U>>

Available on crate feature std only.
Source§

fn view<T, F: FnOnce(&U) -> T>(&self, f: F) -> Result<T, PoisonedThreadError>

Source§

fn unwrap(self) -> Result<U, PoisonedThreadError>

Implementors§

Source§

impl<U: Send + 'static> OwnedRetriever<U> for MultiThreadedOwnedRetriever<U>

Source§

impl<U: Send + 'static> OwnedRetriever<U> for SingleThreadedOwnedRetriever<U>

Available on crate feature std only.