[−][src]Crate rc_borrow
ArcBorrow<_>
is functionally equivalent to &Arc<_>
,
but it's represented as &T
, avoiding the extra indirection.
Examples
let resource: Arc<Resource> = acquire_resource(); let borrowed: ArcBorrow<'_, Resource> = (&resource).into(); let reference: &Resource = ArcBorrow::downgrade(borrowed); let cloned: Arc<Resource> = ArcBorrow::upgrade(borrowed); fn use_resource(resource: &Resource) { /* ... */ } use_resource(&borrowed);
Structs
ArcBorrow | Borrowed version of |
RcBorrow | Borrowed version of |