Trait im::shared::Shared
[−]
[src]
pub trait Shared<A> { fn shared(self) -> Arc<A>; }
Automatic Arc
wrapping
The Shared
trait provides automatic wrapping for things which
take Arc
s, 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 Arc
s, Shared
makes you have to
worry less about whether what you've got is an A
or an Arc<A>
or a reference to such - the compiler will just figure it out for
you, which is as it should be.
Required Methods
Implementations on Foreign Types
impl<'a, A> Shared<A> for &'a A where
A: Clone,
[src]
A: Clone,
impl<A> Shared<A> for Arc<A>
[src]
impl<'a, A> Shared<A> for &'a Arc<A>
[src]
Implementors
impl<A> Shared<A> for A