pub struct ArcRef<'a, T: 'static> { /* private fields */ }Expand description
A type that represents &'a Arc<T>.
Implementations§
Source§impl<'a, T> ArcRef<'a, T>
impl<'a, T> ArcRef<'a, T>
Sourcepub closed spec fn deref_as_arc_spec(&self) -> &Arc<T>
pub closed spec fn deref_as_arc_spec(&self) -> &Arc<T>
Sourcepub broadcast proof fn arcref_deref_spec_eq(self)
pub broadcast proof fn arcref_deref_spec_eq(self)
ensures
#[trigger] self.deref_as_arc_spec() == #[trigger] self.deref_spec(),A workaround that Verus does not support implementing spec for Deref trait yet.
Source§impl<'a, T> ArcRef<'a, T>
impl<'a, T> ArcRef<'a, T>
Sourcepub exec fn deref_target(&self) -> ret : &'a T
pub exec fn deref_target(&self) -> ret : &'a T
ensures
*ret == *(self.deref_as_arc_spec()),Dereferences self to get a reference to T with the lifetime 'a.
VERUS LIMITATION: The code includes a cast from &T to *const T, which is not specified yet in Verus.
This is also a nontrivial use case that extends the lifetime of the reference.
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for ArcRef<'a, T>
impl<'a, T> RefUnwindSafe for ArcRef<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for ArcRef<'a, T>
impl<'a, T> Sync for ArcRef<'a, T>
impl<'a, T> Unpin for ArcRef<'a, T>
impl<'a, T> UnwindSafe for ArcRef<'a, T>where
T: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more