pub struct SharedEntity { /* private fields */ }Expand description
One copy of a cached entity: fields shared with every other copy that has
the same ones, plus this copy’s _version.
It reads and compares as the whole entity it stands for, _version
included: Self::to_value rebuilds that entity, and equality, field
access (EntityFields) and indexing see it too.
Implementations§
Whether other shares this entity’s fields rather than holding a copy
of its own. Sharing says nothing about _version.
Sourcepub fn into_value(self) -> Value
pub fn into_value(self) -> Value
The whole entity, copying the fields only if another holder shares them.
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