pub struct RunScope {
pub vars: BTreeMap<String, String>,
pub contract_version: Option<String>,
pub skip_if_fingerprint_match: bool,
pub write_receipt: bool,
pub run_id: Option<String>,
}Expand description
Variables and policy for one pipeline invocation (CLI / library / orchestrator).
Fields§
§vars: BTreeMap<String, String>Free-form and partition binds (report_date, run_id, domain, …).
contract_version: Option<String>Optional contract version stamped into fingerprints / receipts.
Overrides rbt_project.yml contract_version when set.
skip_if_fingerprint_match: boolWhen true, skip materialize if bronze fingerprint matches last successful receipt.
write_receipt: boolWrite .rbt/runs/{run_id}.json receipt after run (default true for CLI run).
run_id: Option<String>Explicit run id; generated when empty.
Implementations§
Source§impl RunScope
impl RunScope
pub fn new() -> Self
pub fn with_var(self, key: impl Into<String>, value: impl Into<String>) -> Self
Sourcepub fn extend_from_kv_pairs<'a, I>(&mut self, pairs: I) -> Result<()>where
I: IntoIterator<Item = &'a str>,
pub fn extend_from_kv_pairs<'a, I>(&mut self, pairs: I) -> Result<()>where
I: IntoIterator<Item = &'a str>,
Parse repeated key=value tokens (CLI --var).
Sourcepub fn extend_from_env(&mut self)
pub fn extend_from_env(&mut self)
Load RBT_VAR_<KEY> env vars (e.g. RBT_VAR_REPORT_DATE=2026-07-29 → report_date).
Sourcepub fn expand_template(&self, input: &str) -> String
pub fn expand_template(&self, input: &str) -> String
Expand {name} and ${name} using run vars (not project $roots).
Sourcepub fn effective_require_partitions(
&self,
partition_by: &[String],
frontmatter: &HashMap<String, String>,
) -> HashMap<String, String>
pub fn effective_require_partitions( &self, partition_by: &[String], frontmatter: &HashMap<String, String>, ) -> HashMap<String, String>
Merge frontmatter require_partitions with run vars for keys in partition_by.
Run vars win over static frontmatter values for the same key. Values are template-expanded.
Sourcepub fn scope_key(&self) -> String
pub fn scope_key(&self) -> String
Stable short key for receipts scoped by vars (not including run_id).
pub fn resolve_run_id(&self) -> String
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RunScope
impl<'de> Deserialize<'de> for RunScope
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for RunScope
impl StructuralPartialEq for RunScope
Auto Trait Implementations§
impl Freeze for RunScope
impl RefUnwindSafe for RunScope
impl Send for RunScope
impl Sync for RunScope
impl Unpin for RunScope
impl UnsafeUnpin for RunScope
impl UnwindSafe for RunScope
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for T
impl<T> Downcast for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more