pub struct EntityRef {
pub target_path: &'static str,
/* private fields */
}Expand description
EntityRef
Concrete reference extracted from an entity instance.
Carries the target entity path and the referenced key value.
Produced by [EntityReferences] during pre-commit planning.
Fields§
§target_path: &'static strImplementations§
Source§impl EntityRef
impl EntityRef
pub const fn from_storage_key( target_path: &'static str, key: StorageKey, ) -> Self
Sourcepub fn matches_data_key(&self, data_key: &DataKey) -> bool
pub fn matches_data_key(&self, data_key: &DataKey) -> bool
Returns true if this reference points at the given data key.
Invariant:
target_pathmust already have been validated- comparison is storage-key–level only
Sourcepub const fn storage_key(&self) -> StorageKey
pub const fn storage_key(&self) -> StorageKey
Expose the referenced storage key (for diagnostics / logging).
Trait Implementations§
impl Eq for EntityRef
impl StructuralPartialEq for EntityRef
Auto Trait Implementations§
impl Freeze for EntityRef
impl RefUnwindSafe for EntityRef
impl Send for EntityRef
impl Sync for EntityRef
impl Unpin for EntityRef
impl UnsafeUnpin for EntityRef
impl UnwindSafe for EntityRef
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