pub struct Ref<T> { /* private fields */ }Expand description
A borrowed reference to the shared value.
Outstanding borrows hold a read lock.
Implementations§
source§impl<T> Ref<T>
impl<T> Ref<T>
sourcepub fn has_changed(&self) -> Option<bool>
pub fn has_changed(&self) -> Option<bool>
Query the change status
Returns Some(true) if the the shared value behind this reference
is considered as changed or Some(false) if unchanged. The status
is determined when borrowing the reference, i.e. after acquiring the
read lock.
Depending on the implementation or how the reference has been obtained
the change status might be unknown and None is returned.
Trait Implementations§
Auto Trait Implementations§
impl<T> RefUnwindSafe for Ref<T>where T: RefUnwindSafe,
impl<T> Send for Ref<T>where T: Send,
impl<T> Sync for Ref<T>where T: Sync,
impl<T> Unpin for Ref<T>where T: Unpin,
impl<T> UnwindSafe for Ref<T>where T: UnwindSafe,
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