Share

Trait Share 

Source
pub trait Share {
    // Required method
    fn share(&self) -> Self;
}
Expand description

Trait for object that can be shared. This is an equivalent of Clone for objects that require to be released.

Required Methods§

Source

fn share(&self) -> Self

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: Share> Share for Option<T>

Source§

fn share(&self) -> Self

Implementors§