pub struct CatalogCompiler { /* private fields */ }Expand description
Builds a CatalogSnapshot by merging layers in precedence order:
bundled < live < user overrides. Later layers override earlier rows that
share a (provider, wire id) identity.
Implementations§
Source§impl CatalogCompiler
impl CatalogCompiler
Sourcepub fn with_bundled(self, rows: Vec<CatalogOffering>) -> Self
pub fn with_bundled(self, rows: Vec<CatalogOffering>) -> Self
Add bundled (lowest-precedence) rows.
Sourcepub fn with_models_dev(self, catalog: &ModelsDevCatalog) -> Self
pub fn with_models_dev(self, catalog: &ModelsDevCatalog) -> Self
Seed bundled rows from a parsed Models.dev catalog.
Sourcepub fn with_live(self, rows: Vec<CatalogOffering>) -> Self
pub fn with_live(self, rows: Vec<CatalogOffering>) -> Self
Add live (middle-precedence) rows.
Sourcepub fn with_overrides(self, rows: Vec<CatalogOffering>) -> Self
pub fn with_overrides(self, rows: Vec<CatalogOffering>) -> Self
Add user/custom override (highest-precedence) rows.
Sourcepub fn compile(self) -> CatalogSnapshot
pub fn compile(self) -> CatalogSnapshot
Merge all layers into a deterministic snapshot.
Trait Implementations§
Source§impl Clone for CatalogCompiler
impl Clone for CatalogCompiler
Source§fn clone(&self) -> CatalogCompiler
fn clone(&self) -> CatalogCompiler
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 CatalogCompiler
impl Debug for CatalogCompiler
Source§impl Default for CatalogCompiler
impl Default for CatalogCompiler
Source§fn default() -> CatalogCompiler
fn default() -> CatalogCompiler
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CatalogCompiler
impl RefUnwindSafe for CatalogCompiler
impl Send for CatalogCompiler
impl Sync for CatalogCompiler
impl Unpin for CatalogCompiler
impl UnsafeUnpin for CatalogCompiler
impl UnwindSafe for CatalogCompiler
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