pub struct RuntimePolicy { /* private fields */ }Expand description
Runtime policy resolved from environment and CLI input.
Implementations§
Source§impl RuntimePolicy
impl RuntimePolicy
Sourcepub fn from_environment(
environment: &EnvironmentInput,
cli_strict: bool,
) -> Result<Self>
pub fn from_environment( environment: &EnvironmentInput, cli_strict: bool, ) -> Result<Self>
Parses runtime policy from explicit environment input and CLI strictness.
§Errors
Returns an error when an environment value is not a supported boolean.
Sourcepub fn from_process_env(cli_strict: bool) -> Result<Self>
pub fn from_process_env(cli_strict: bool) -> Result<Self>
Reads runtime policy from the process environment and CLI strictness.
§Errors
Returns an error when an environment value is not a supported boolean.
Sourcepub const fn from_overrides(
overrides: RuntimeOptionOverrides,
cli_strict: bool,
) -> Self
pub const fn from_overrides( overrides: RuntimeOptionOverrides, cli_strict: bool, ) -> Self
Builds runtime policy from parsed environment overrides.
Sourcepub const fn pre_config_strict(&self) -> bool
pub const fn pre_config_strict(&self) -> bool
Returns strict mode before config discovery.
Sourcepub fn resolve(&self, config: &ConfigRuntimeOptions) -> ResolvedRuntimePolicy
pub fn resolve(&self, config: &ConfigRuntimeOptions) -> ResolvedRuntimePolicy
Resolves runtime options using defaults, config, environment, then CLI.
Trait Implementations§
Source§impl Clone for RuntimePolicy
impl Clone for RuntimePolicy
Source§fn clone(&self) -> RuntimePolicy
fn clone(&self) -> RuntimePolicy
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 moreimpl Copy for RuntimePolicy
Source§impl Debug for RuntimePolicy
impl Debug for RuntimePolicy
impl Eq for RuntimePolicy
Source§impl PartialEq for RuntimePolicy
impl PartialEq for RuntimePolicy
Source§fn eq(&self, other: &RuntimePolicy) -> bool
fn eq(&self, other: &RuntimePolicy) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RuntimePolicy
Auto Trait Implementations§
impl Freeze for RuntimePolicy
impl RefUnwindSafe for RuntimePolicy
impl Send for RuntimePolicy
impl Sync for RuntimePolicy
impl Unpin for RuntimePolicy
impl UnsafeUnpin for RuntimePolicy
impl UnwindSafe for RuntimePolicy
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