pub struct Registry { /* private fields */ }Expand description
The resolved set of transforms, addressable by id@version.
Implementations§
Source§impl Registry
impl Registry
pub fn builder() -> RegistryBuilder
Sourcepub fn get(&self, id: &str, version: &str) -> Option<&RegisteredTransform>
pub fn get(&self, id: &str, version: &str) -> Option<&RegisteredTransform>
Exact id@version lookup.
Sourcepub fn latest(&self, id: &str) -> Option<&RegisteredTransform>
pub fn latest(&self, id: &str) -> Option<&RegisteredTransform>
Highest semver for an id.
Sourcepub fn resolve(&self, selector: &str) -> Option<&RegisteredTransform>
pub fn resolve(&self, selector: &str) -> Option<&RegisteredTransform>
Resolve a selector: "id" → latest; "id@version" → exact.
pub fn iter(&self) -> impl Iterator<Item = &RegisteredTransform>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn to_index(&self) -> RegistryIndex
pub fn to_index(&self) -> RegistryIndex
The derived, serializable index — write it at build/publish time so runtime startup loads this instead of re-scanning + re-validating the tree.
Sourcepub fn from_index(index: RegistryIndex) -> Result<Self, RegistryError>
pub fn from_index(index: RegistryIndex) -> Result<Self, RegistryError>
Reconstruct from a derived index (no directory scan). Fails if the index was produced against a different contract version.
Trait Implementations§
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§
impl<T> Allocation for T
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