pub struct GhostShared<T>(/* private fields */);Expand description
A type for sharing ghost data immutably.
Implementations§
Sourcepub fn to_ref<'a>(self) -> &'a T
pub fn to_ref<'a>(self) -> &'a T
Access the value of the GhostShared immutably.
§Note on lifetimes
Note that this function returns a borrow at an arbitrary lifetime
'a. This is possible because GhostShared is a ghost-only type: the
underlying T object is ‘magically’ made to live at least as long as
'a.
ghost
ensures
*result == self.val()Trait Implementations§
Auto Trait Implementations§
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