pub struct ProviderConfig { /* private fields */ }Expand description
A validated provider configuration.
svg is Some only when both roles were supplied and every field
validated. Every other input is either an empty configuration, which
leaves svg on its passthrough-only path, or a run configuration
error raised before traversal.
Implementations§
Source§impl ProviderConfig
impl ProviderConfig
Sourcepub fn empty() -> ProviderConfig
pub fn empty() -> ProviderConfig
A configuration with no provider: the shape a run has when no configuration file is supplied.
Sourcepub fn svg(&self) -> Option<&SvgProvider>
pub fn svg(&self) -> Option<&SvgProvider>
The svg provider, when the configuration carries a complete one.
Sourcepub fn parse(text: &str) -> Result<ProviderConfig>
pub fn parse(text: &str) -> Result<ProviderConfig>
Parses and validates one configuration text.
Sourcepub fn load(path: &Path) -> Result<ProviderConfig>
pub fn load(path: &Path) -> Result<ProviderConfig>
Loads a configuration from a TOML file.
Sourcepub fn digest_material(
pins: &BTreeMap<String, ProviderPin>,
jail: &ProviderJailIdentity,
) -> Option<String>
pub fn digest_material( pins: &BTreeMap<String, ProviderPin>, jail: &ProviderJailIdentity, ) -> Option<String>
The material the effective rules version digests for a configured provider: presence, the generic role labels, the rules-pinned hashes and versions, the adapter version, the geometry and flatten options, and the jail identity, which is the profile template’s BLAKE3 together with the two parameter values the deployment supplied.
Absolute paths are deliberately excluded, so moving an identical pinned provider to another path re-runs nothing. The parameter values enter as digest material only, so they never appear in a record: two runs under different values, or under an edited template, are different effective versions and never checkpoint against each other.
Sourcepub fn version_suffix(
pins: &BTreeMap<String, ProviderPin>,
jail: &ProviderJailIdentity,
) -> Option<String>
pub fn version_suffix( pins: &BTreeMap<String, ProviderPin>, jail: &ProviderJailIdentity, ) -> Option<String>
The effective-version suffix a configured provider contributes
under the given pins and jail identity, or None when the pins
are incomplete. The form is svg.<12 hex>, appended to the
numeric rules version with a +.
Sourcepub fn jail_identity(&self) -> ProviderJailIdentity
pub fn jail_identity(&self) -> ProviderJailIdentity
The jail identity this configuration runs under: the profile template’s BLAKE3 on this platform and the two parameter values the rasterizer role supplied.
Trait Implementations§
Source§impl Clone for ProviderConfig
impl Clone for ProviderConfig
Source§impl Debug for ProviderConfig
impl Debug for ProviderConfig
Auto Trait Implementations§
impl Freeze for ProviderConfig
impl RefUnwindSafe for ProviderConfig
impl Send for ProviderConfig
impl Sync for ProviderConfig
impl Unpin for ProviderConfig
impl UnsafeUnpin for ProviderConfig
impl UnwindSafe for ProviderConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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