pub type Arc<T> = Arc<T>;Expand description
A conditionally compiled atomic or non-atomic reference counter.
In this target it’s backed by std::sync::Arc<T>.
Aliased Type§
pub struct Arc<T> { /* private fields */ }Trait Implementations§
Source§impl<T: Storable + CondSync> Storable for Arc<T>
impl<T: Storable + CondSync> Storable for Arc<T>
Source§type Serializable = <T as Storable>::Serializable
type Serializable = <T as Storable>::Serializable
The at-rest representation of this storable type.
Source§async fn to_serializable(
&self,
store: &impl BlockStore,
) -> Result<Self::Serializable>
async fn to_serializable( &self, store: &impl BlockStore, ) -> Result<Self::Serializable>
Turn the current type into the at-rest representation of this type.
Source§async fn from_serializable(
cid: Option<&Cid>,
serializable: Self::Serializable,
) -> Result<Self>
async fn from_serializable( cid: Option<&Cid>, serializable: Self::Serializable, ) -> Result<Self>
Take an at-rest representation of this type and turn it into the in-memory representation.
You can use the
cid parameter to populate a cache.Source§fn persisted_as(&self) -> Option<&OnceCell<Cid>>
fn persisted_as(&self) -> Option<&OnceCell<Cid>>
Return a serialization cache, if it exists.
By default, this always returns
None.