pub struct TaskConfig { /* private fields */ }Expand description
One complete immutable task configuration.
This is an owned handle rather than an owned copy of configuration data.
TaskParameters shares fixed/sweep storage and ProjectPaths shares
path storage through independent std::sync::Arc allocations, making a
TaskConfig cheap to move into worker queues and safe to retain after the
originating ProjectConfig is dropped.
Implementations§
Source§impl TaskConfig
impl TaskConfig
Sourcepub fn task_ordinal(&self) -> u64
pub fn task_ordinal(&self) -> u64
Returns the stable zero-based task ordinal.
Sourcepub fn parameters(&self) -> &TaskParameters
pub fn parameters(&self) -> &TaskParameters
Borrows the fixed-plus-selected-sweep dictionary.
Sourcepub fn paths(&self) -> &ProjectPaths
pub fn paths(&self) -> &ProjectPaths
Borrows the shared project path dictionary.
Sourcepub fn value(&self, key: &str) -> Option<&Value>
pub fn value(&self, key: &str) -> Option<&Value>
Borrows one fixed or selected sweep value by exact key.
Sourcepub fn require_value(&self, key: &str) -> Result<&Value, ConfigurationError>
pub fn require_value(&self, key: &str) -> Result<&Value, ConfigurationError>
Borrows one required fixed or selected sweep value.
Sourcepub fn decode_value<T>(&self, key: &str) -> Result<T, ConfigurationError>where
T: DeserializeOwned,
pub fn decode_value<T>(&self, key: &str) -> Result<T, ConfigurationError>where
T: DeserializeOwned,
Decodes one required parameter into the requested concrete Rust type.
Sourcepub fn resolve_path(&self, key: &str) -> Result<PathBuf, ConfigurationError>
pub fn resolve_path(&self, key: &str) -> Result<PathBuf, ConfigurationError>
Resolves one named path lexically against the project root.
Trait Implementations§
Source§impl Clone for TaskConfig
impl Clone for TaskConfig
Source§fn clone(&self) -> TaskConfig
fn clone(&self) -> TaskConfig
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 moreAuto Trait Implementations§
impl Freeze for TaskConfig
impl RefUnwindSafe for TaskConfig
impl Send for TaskConfig
impl Sync for TaskConfig
impl Unpin for TaskConfig
impl UnsafeUnpin for TaskConfig
impl UnwindSafe for TaskConfig
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