pub struct EntityRegistry { /* private fields */ }Expand description
Entity registry: holds all shared entities loaded from actors/ and
institutions/ directories. Provides name-based lookup for cross-file
resolution.
Implementations§
Source§impl EntityRegistry
impl EntityRegistry
Sourcepub fn load(root: &Path) -> Result<Self, Vec<ParseError>>
pub fn load(root: &Path) -> Result<Self, Vec<ParseError>>
Build a registry from a content root directory.
Scans {root}/actors/*.md and {root}/institutions/*.md, parses each
file, validates for duplicates and filename mismatches.
Sourcepub fn from_entries(
entries: Vec<RegistryEntry>,
) -> Result<Self, Vec<ParseError>>
pub fn from_entries( entries: Vec<RegistryEntry>, ) -> Result<Self, Vec<ParseError>>
Build a registry from pre-parsed entries.
Sourcepub fn get_by_name(&self, name: &str) -> Option<&RegistryEntry>
pub fn get_by_name(&self, name: &str) -> Option<&RegistryEntry>
Look up an entity by name. Returns None if not found.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EntityRegistry
impl RefUnwindSafe for EntityRegistry
impl Send for EntityRegistry
impl Sync for EntityRegistry
impl Unpin for EntityRegistry
impl UnsafeUnpin for EntityRegistry
impl UnwindSafe for EntityRegistry
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