pub struct Registry { /* private fields */ }Expand description
The three books. Keys are canonical locator spellings (Display is the canonical form by the locator round-trip law).
Implementations§
Source§impl Registry
impl Registry
pub fn new() -> Registry
pub fn register_artifact(&mut self, artifact: Artifact) -> RegisterVerdict
Sourcepub fn promote_asset(
&mut self,
locator: &Locator,
) -> Result<RegisterVerdict, AxError>
pub fn promote_asset( &mut self, locator: &Locator, ) -> Result<RegisterVerdict, AxError>
Promotion registers standing only; scoring is an instrument’s (citysim). An unregistered locator cannot be an asset — assets are promoted artifacts, not free-floating paths.
pub fn register_resident(&mut self, id: ResidentId) -> RegisterVerdict
pub fn artifact(&self, locator: &Locator) -> Option<&Artifact>
Sourcepub fn is_asset(&self, locator: &Locator) -> bool
pub fn is_asset(&self, locator: &Locator) -> bool
Whether this locator was promoted. The Discard door does not ask:
a planned discard of an asset is as reversible as any other
(crates/kernel/spec/Discard.lean §8-26).
Sourcepub fn is_asset_at(&self, addr: &Address) -> bool
pub fn is_asset_at(&self, addr: &Address) -> bool
Address-level asset membership: a path is an
asset when any registered asset is a file: locator at exactly
this address (content pins differ, the place is the same).
pub fn is_resident(&self, id: &ResidentId) -> bool
Trait Implementations§
impl Eq for Registry
impl StructuralPartialEq for Registry
Auto Trait Implementations§
impl Freeze for Registry
impl RefUnwindSafe for Registry
impl Send for Registry
impl Sync for Registry
impl Unpin for Registry
impl UnsafeUnpin for Registry
impl UnwindSafe for Registry
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