Trait im::shared::Shared [] [src]

pub trait Shared<T> {
    fn shared(self) -> Arc<T>;
}

Automatic Arc wrapping

The Shared trait provides automatic wrapping for things which take Arcs, meaning that anything which takes an argument of type Shared<A> will accept either an A or an Arc<A>.

Because everything stored in im's persistent data structures is wrapped in Arcs, Shared makes you have to worry less about whether what you've got is an A or an Arc<A> - the compiler will just figure it out for you, which is as it should be.

Required Methods

Implementations on Foreign Types

impl<T> Shared<T> for Arc<T>
[src]

[src]

Implementors