Trait ArcGuardExt

Source
pub trait ArcGuardExt<RC> {
    // Required method
    fn guard<'head, F, T>(&self, getter: F) -> ArcGuard<RC, T> 
       where F: FnOnce(&'head RC) -> T,
             RC: 'head,
             T: 'head;
}
Expand description

A convenience trait for Arc<> that makes it easier to construct ArcGuard<> instances.

See Module Documentation for more information.

Required Methods§

Source

fn guard<'head, F, T>(&self, getter: F) -> ArcGuard<RC, T>
where F: FnOnce(&'head RC) -> T, RC: 'head, T: 'head,

Convenience method for constructing ArcGuard<> instances.

See Module Documentation for more information.

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<RC> ArcGuardExt<RC> for Arc<RC>

Source§

fn guard<'head, F, T>(&self, getter: F) -> ArcGuard<RC, T>
where F: FnOnce(&'head RC) -> T, RC: 'head, T: 'head,

Implementors§