pub struct BindingPlan { /* private fields */ }Expand description
Canonical deterministic declaration for one atomic parameter-binding unit.
Implementations§
Source§impl BindingPlan
impl BindingPlan
Sourcepub fn new(bindings: Vec<PlannedBinding>) -> Result<Self, BindingPlanError>
pub fn new(bindings: Vec<PlannedBinding>) -> Result<Self, BindingPlanError>
Builds a plan in which every physical source claim is exclusive.
Builds a plan with an explicit allowlist for intentionally shared sources.
Sourcepub fn with_explicit_exceptions(
bindings: Vec<PlannedBinding>,
shared_source_keys: BTreeSet<String>,
permitted_dtype_conversions: BTreeMap<String, Vec<RecipeDtype>>,
) -> Result<Self, BindingPlanError>
pub fn with_explicit_exceptions( bindings: Vec<PlannedBinding>, shared_source_keys: BTreeSet<String>, permitted_dtype_conversions: BTreeMap<String, Vec<RecipeDtype>>, ) -> Result<Self, BindingPlanError>
Builds a plan with explicit shared-source and native source-dtype declarations.
Admitted source dtypes retain their recipe metadata and byte accounting. This declaration does not insert a dtype conversion.
Sourcepub fn bindings(&self) -> &[PlannedBinding]
pub fn bindings(&self) -> &[PlannedBinding]
Returns declarations in deterministic target order.
Sourcepub fn source_keys(&self) -> Vec<&str>
pub fn source_keys(&self) -> Vec<&str>
Returns distinct physical source keys in lexical order.
Returns sources explicitly declared as shared by multiple targets.
Sourcepub fn build_bindings(
&self,
source: &dyn CheckpointSource,
) -> Result<Vec<WeightBinding>, BindingPlanError>
pub fn build_bindings( &self, source: &dyn CheckpointSource, ) -> Result<Vec<WeightBinding>, BindingPlanError>
Infers every recipe and lowers this declaration to residency bindings.
An authoritative materialized overlay wins over its semantic recipe.
Trait Implementations§
Source§impl Clone for BindingPlan
impl Clone for BindingPlan
Source§fn clone(&self) -> BindingPlan
fn clone(&self) -> BindingPlan
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 BindingPlan
impl Debug for BindingPlan
impl Eq for BindingPlan
Source§impl PartialEq for BindingPlan
impl PartialEq for BindingPlan
impl StructuralPartialEq for BindingPlan
Auto Trait Implementations§
impl Freeze for BindingPlan
impl RefUnwindSafe for BindingPlan
impl Send for BindingPlan
impl Sync for BindingPlan
impl Unpin for BindingPlan
impl UnsafeUnpin for BindingPlan
impl UnwindSafe for BindingPlan
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