pub struct CatalogSnapshot { /* private fields */ }Expand description
Immutable, runtime-controlled worker catalog. Entries are exact qualified identities.
Implementations§
Source§impl CatalogSnapshot
impl CatalogSnapshot
Sourcepub fn new(entries: impl IntoIterator<Item = QualifiedModelId>) -> Self
pub fn new(entries: impl IntoIterator<Item = QualifiedModelId>) -> Self
Trusted convenience constructor for callers whose descriptors are all active workers.
pub fn from_entries(entries: impl IntoIterator<Item = CatalogEntry>) -> Self
pub fn id(&self) -> &str
pub fn digest_sha256(&self) -> &str
pub fn contains(&self, model: &QualifiedModelId) -> bool
Sourcepub fn with_model(&self, model: QualifiedModelId) -> Self
pub fn with_model(&self, model: QualifiedModelId) -> Self
Admits one additional exact identity as an available worker-eligible descriptor, recomputing the snapshot id/digest. Used for explicit mid-session user grants; an existing entry is upgraded to eligible.
Trait Implementations§
Source§impl Clone for CatalogSnapshot
impl Clone for CatalogSnapshot
Source§fn clone(&self) -> CatalogSnapshot
fn clone(&self) -> CatalogSnapshot
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CatalogSnapshot
impl Debug for CatalogSnapshot
Auto Trait Implementations§
impl Freeze for CatalogSnapshot
impl RefUnwindSafe for CatalogSnapshot
impl Send for CatalogSnapshot
impl Sync for CatalogSnapshot
impl Unpin for CatalogSnapshot
impl UnsafeUnpin for CatalogSnapshot
impl UnwindSafe for CatalogSnapshot
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