repo stringlengths 6 65 | file_url stringlengths 81 311 | file_path stringlengths 6 227 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:31:58 2026-01-04 20:25:31 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cmd_ctx/src/cmd_ctx_mpnf_params.rs | crate/cmd_ctx/src/cmd_ctx_mpnf_params.rs | use std::{collections::BTreeMap, fmt::Debug, future::IntoFuture};
use futures::{future::LocalBoxFuture, FutureExt};
use interruptible::Interruptibility;
use own::{OwnedOrMutRef, OwnedOrRef};
use peace_params::ParamsValue;
use peace_profile_model::Profile;
use peace_resource_rt::internal::WorkspaceParamsFile;
use peace... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cmd_ctx/src/profile_selection.rs | crate/cmd_ctx/src/profile_selection.rs | use own::OwnedOrRef;
use peace_profile_model::Profile;
/// How the `CmdCtx` knows which `Profile` to use.
///
/// This is applicable to single flow `CmdCtx`s: [`CmdCtxSpsf`] and
/// [`CmdCtxMpsf`]
///
/// [`CmdCtxSpsf`]: crate::CmdCtxSpsf
/// [`CmdCtxMpsf`]: crate::CmdCtxMpsf
#[derive(Clone, Debug, PartialEq, Eq)]
pub... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cmd_ctx/src/cmd_ctx_spnf_params.rs | crate/cmd_ctx/src/cmd_ctx_spnf_params.rs | use std::future::IntoFuture;
use futures::{future::LocalBoxFuture, FutureExt};
use interruptible::Interruptibility;
use own::{OwnedOrMutRef, OwnedOrRef};
use peace_params::ParamsValue;
use peace_resource_rt::{
internal::{ProfileParamsFile, WorkspaceParamsFile},
paths::{ProfileDir, ProfileHistoryDir},
};
use pe... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cmd_ctx/src/cmd_ctx_npnf.rs | crate/cmd_ctx/src/cmd_ctx_npnf.rs | use interruptible::InterruptibilityState;
use own::{OwnedOrMutRef, OwnedOrRef};
use peace_resource_rt::paths::{PeaceAppDir, PeaceDir, WorkspaceDir};
use peace_rt_model::Workspace;
use peace_rt_model_core::params::WorkspaceParams;
use type_reg::untagged::{BoxDt, TypeReg};
use crate::{CmdCtxNpnfParams, CmdCtxNpnfParamsB... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cmd_ctx/src/cmd_ctx_mpnf.rs | crate/cmd_ctx/src/cmd_ctx_mpnf.rs | use std::{collections::BTreeMap, fmt::Debug};
use interruptible::InterruptibilityState;
use own::{OwnedOrMutRef, OwnedOrRef};
use peace_profile_model::Profile;
use peace_resource_rt::paths::{
PeaceAppDir, PeaceDir, ProfileDir, ProfileHistoryDir, WorkspaceDir,
};
use peace_rt_model::{
params::{ProfileParams, Wo... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cmd_ctx/src/profile_filter_fn.rs | crate/cmd_ctx/src/profile_filter_fn.rs | use std::fmt;
use peace_profile_model::Profile;
/// Filter function for `MultiProfile` scopes.
pub struct ProfileFilterFn(pub(crate) Box<dyn Fn(&Profile) -> bool>);
impl ProfileFilterFn {
/// Returns whether the profile passes this filter.
pub fn call(&self, profile: &Profile) -> bool {
(self.0)(prof... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cmd_ctx/src/cmd_ctx_spsf_params.rs | crate/cmd_ctx/src/cmd_ctx_spsf_params.rs | use std::future::IntoFuture;
use futures::{future::LocalBoxFuture, FutureExt};
use interruptible::Interruptibility;
use own::{OwnedOrMutRef, OwnedOrRef};
use peace_flow_rt::Flow;
use peace_item_model::ItemId;
use peace_params::{ParamsSpecs, ParamsValue};
use peace_resource_rt::{
internal::{FlowParamsFile, ProfileP... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cmd_ctx/src/cmd_ctx_mpsf.rs | crate/cmd_ctx/src/cmd_ctx_mpsf.rs | use std::{collections::BTreeMap, fmt::Debug};
use interruptible::InterruptibilityState;
use own::{OwnedOrMutRef, OwnedOrRef};
use peace_flow_rt::Flow;
use peace_params::{MappingFnReg, ParamsSpecs};
use peace_profile_model::Profile;
use peace_resource_rt::{
paths::{FlowDir, PeaceAppDir, PeaceDir, ProfileDir, Profil... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cmd_ctx/src/cmd_ctx_builder_support.rs | crate/cmd_ctx/src/cmd_ctx_builder_support.rs | use futures::{StreamExt, TryStreamExt};
use peace_flow_rt::{Flow, ItemGraph};
use peace_item_model::ItemId;
use peace_params::{MappingFnReg, MappingFns, ParamsKey, ParamsSpecs};
use peace_profile_model::Profile;
use peace_resource_rt::{
internal::{FlowParamsFile, ProfileParamsFile, WorkspaceParamsFile},
paths::... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cmd_ctx/src/cmd_ctx_spsf.rs | crate/cmd_ctx/src/cmd_ctx_spsf.rs | use interruptible::InterruptibilityState;
use own::{OwnedOrMutRef, OwnedOrRef};
use peace_flow_rt::Flow;
use peace_params::{MappingFnReg, ParamsSpecs};
use peace_profile_model::Profile;
use peace_resource_rt::{
paths::{FlowDir, PeaceAppDir, PeaceDir, ProfileDir, ProfileHistoryDir, WorkspaceDir},
resources::ts::... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cmd_ctx/src/cmd_ctx_builder_support_multi.rs | crate/cmd_ctx/src/cmd_ctx_builder_support_multi.rs | use futures::stream::TryStreamExt;
use own::OwnedOrRef;
use peace_flow_model::FlowId;
use peace_flow_rt::Flow;
use peace_params::ParamsSpecs;
use peace_profile_model::Profile;
use peace_resource_rt::{
internal::{FlowParamsFile, ProfileParamsFile, WorkspaceDirs},
paths::{
FlowDir, ParamsSpecsFile, PeaceA... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/lib.rs | crate/resource_rt/src/lib.rs | //! Runtime resources for the peace automation framework.
//!
//! This crate contains resources necessary for the peace framework to work, and
//! are likely to be common use for all applications.
// Re-exports
pub use resman::*;
pub use type_reg;
pub use crate::{item_rt_id::ItemRtId, resources::Resources};
pub mod ... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/internal.rs | crate/resource_rt/src/internal.rs | //! Data types used by the framework, not part of API.
//!
//! Since this is not API, it is not intended to be used (or useful outside the
//! framework). There may be breakage between releases.
pub use self::{
flow_params_file::FlowParamsFile, profile_params_file::ProfileParamsFile,
state_diffs_mut::StateDiff... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/resources.rs | crate/resource_rt/src/resources.rs | use std::{
marker::PhantomData,
ops::{Deref, DerefMut},
};
use crate::resources::ts::{Empty, SetUp};
pub mod ts;
/// Runtime borrow-checked typemap of data available to the command context.
/// [`resman::Resources`] newtype.
///
/// This augments the any-map functionality of [`resman::Resources`] with type
/... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/paths.rs | crate/resource_rt/src/paths.rs | //! Types for well-known directories.
//!
//! # Design
//!
//! The designed structure of directories and their contents is as follows:
//!
//! ```bash
//! WorkspaceDir
//! |- PeaceDir
//! |- ProfileDir # "profile_name", multiple
//! |- HistoryDir
//! | |- CmdExecution0
//! | |- ..
//! ... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/item_rt_id.rs | crate/resource_rt/src/item_rt_id.rs | use std::ops::{Deref, DerefMut};
use peace_data::fn_graph::FnId;
/// Runtime identifier for an [`Item`]. [`FnId`] newtype.
///
/// This is a cheap identifier to copy around, instead of cloning
/// [`ItemId`].
///
/// [`ItemId`]: peace_item_model::ItemId
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct ItemRtId... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/states.rs | crate/resource_rt/src/states.rs | //! Resources that track current and goal states, and state diffs.
pub use self::{
state_diffs::StateDiffs, states_clean::StatesClean, states_cleaned::StatesCleaned,
states_cleaned_dry::StatesCleanedDry, states_current::StatesCurrent,
states_current_stored::StatesCurrentStored, states_ensured::StatesEnsure... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/internal/profile_params_file.rs | crate/resource_rt/src/internal/profile_params_file.rs | use std::{fmt, path::PathBuf};
use crate::paths::ProfileDir;
/// Path to the file that stores the profile initialization parameters.
///
/// Typically `$workspace_dir/.peace/$app/$profile/profile_params.yaml`.
///
/// See `ProfileParamsFile::from<&ProfileDir>` if you want to construct a
/// `ProfileParamsFile` with t... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/internal/workspace_params_file.rs | crate/resource_rt/src/internal/workspace_params_file.rs | use std::{fmt, path::PathBuf};
use crate::paths::PeaceAppDir;
/// Path to the file that stores the workspace initialization parameters.
///
/// Typically `$workspace_dir/.peace/$app/workspace_params.yaml`.
///
/// See `WorkspaceParamsFile::from<&PeaceAppDir>` if you want to construct a
/// `WorkspaceParamsFile` with ... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/internal/states_mut.rs | crate/resource_rt/src/internal/states_mut.rs | use std::{
marker::PhantomData,
ops::{Deref, DerefMut},
};
use peace_item_model::ItemId;
use serde::Serialize;
use type_reg::untagged::{BoxDtDisplay, TypeMap};
/// `State`s for all `Item`s. `TypeMap<ItemId, BoxDtDisplay>` newtype.
///
/// # Implementors
///
/// To reference State from another `Item`, in `Item... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/internal/flow_params_file.rs | crate/resource_rt/src/internal/flow_params_file.rs | use std::{fmt, path::PathBuf};
use crate::paths::FlowDir;
/// Path to the file that stores the flow initialization parameters.
///
/// Typically `$workspace_dir/.peace/$app/$profile/$flow_id/flow_params.yaml`.
///
/// See `FlowParamsFile::from<&FlowDir>` if you want to construct a
/// `FlowParamsFile` with the conven... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/internal/workspace_dirs.rs | crate/resource_rt/src/internal/workspace_dirs.rs | use crate::paths::{PeaceAppDir, PeaceDir, WorkspaceDir};
/// Directories used during `peace` execution.
///
/// This type itself is not inserted into `Resources`, but each of the member
/// directories are individually inserted. This is created by
/// `WorkspaceDirsBuilder` from either the `peace_rt_model` or
/// `pea... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/internal/state_diffs_mut.rs | crate/resource_rt/src/internal/state_diffs_mut.rs | use std::ops::{Deref, DerefMut};
use peace_item_model::ItemId;
use serde::Serialize;
use type_reg::untagged::{BoxDtDisplay, TypeMap};
/// Diffs of `State`s for each `Item`s. `TypeMap<ItemId, BoxDtDisplay>`
/// newtype.
///
/// # Implementors
///
/// [`StateDiffsMut`] is a framework-only type and is never inserted int... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/paths/profile_history_dir.rs | crate/resource_rt/src/paths/profile_history_dir.rs | use std::path::PathBuf;
use crate::paths::ProfileDir;
/// Directory to store all data produced by the current profile's execution.
///
/// Typically `$workspace_dir/.peace/$app/$profile/.history`.
///
/// This directory is intended to contain significant command execution
/// summaries. Currently it is not written to... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/paths/states_current_file.rs | crate/resource_rt/src/paths/states_current_file.rs | use std::path::PathBuf;
use crate::paths::FlowDir;
/// Path to the file that stores items' states.
///
/// Typically `$workspace_dir/.peace/$profile/$flow_id/states_current.yaml`.
///
/// See `StatesCurrentFile::from<&FlowDir>` if you want to construct a
/// `StatesCurrentFile` with the conventional `$flow_dir/states... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/paths/workspace_dir.rs | crate/resource_rt/src/paths/workspace_dir.rs | use std::path::PathBuf;
/// Base directory of the workspace.
///
/// Given a workspace lives in `workspace_dir`, it is natural for users to
/// execute a `peace` tool in any sub directory of `workspace_dir`, in which
/// case execution should be consistent with invocations in `workspace_dir`.
#[derive(Clone, Debug, Pa... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/paths/peace_dir.rs | crate/resource_rt/src/paths/peace_dir.rs | use std::path::PathBuf;
use crate::paths::WorkspaceDir;
/// Directory to store all data produced by `peace` tools' executions.
///
/// Typically `$workspace_dir/.peace`.
///
/// See `PeaceDir::from<&WorkspaceDir>` if you want to construct a `PeaceDir`
/// with the conventional `$workspace_dir/.peace` path.
#[derive(C... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/paths/params_specs_file.rs | crate/resource_rt/src/paths/params_specs_file.rs | use std::path::PathBuf;
use crate::paths::FlowDir;
/// Path to the file that stores items' states.
///
/// Typically `$workspace_dir/.peace/$profile/$flow_id/params_specs.yaml`.
///
/// See `ParamsSpecsFile::from<&FlowDir>` if you want to construct a
/// `ParamsSpecsFile` with the conventional `$flow_dir/params_specs... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/paths/peace_app_dir.rs | crate/resource_rt/src/paths/peace_app_dir.rs | use std::path::PathBuf;
use peace_core::AppName;
use crate::paths::PeaceDir;
/// Directory to store all data produced by the current application's execution.
///
/// Typically `$workspace_dir/.peace/$app`.
///
/// This is the directory that contains all information produced and used during
/// a `peace` tool invocat... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/paths/flow_dir.rs | crate/resource_rt/src/paths/flow_dir.rs | use std::path::PathBuf;
use peace_flow_model::FlowId;
use crate::paths::ProfileDir;
/// Directory to store all data produced by the current flow's execution.
///
/// Typically `$workspace_dir/.peace/$app/$profile/$flow_id`.
///
/// This is the directory that contains the information produced and used during
/// a `p... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/paths/profile_dir.rs | crate/resource_rt/src/paths/profile_dir.rs | use std::path::PathBuf;
use peace_profile_model::Profile;
use crate::paths::PeaceAppDir;
/// Directory to store all data produced by the current profile's execution.
///
/// Typically `$workspace_dir/.peace/$app/$profile`.
///
/// This is the directory that contains all information produced and used during
/// a `pe... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/paths/states_goal_file.rs | crate/resource_rt/src/paths/states_goal_file.rs | use std::path::PathBuf;
use crate::paths::FlowDir;
/// Path to the file that stores items' states.
///
/// Typically `$workspace_dir/.peace/$profile/$flow_id/states_goal.yaml`.
///
/// See `StatesGoalFile::from<&FlowDir>` if you want to construct a
/// `StatesGoalFile` with the conventional `$flow_dir/states_goal.yam... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/resources/ts.rs | crate/resource_rt/src/resources/ts.rs | //! Type states for [`Resources`].
//!
//! This allows compile time checking that [`Resources`] is in the correct state
//! before a particular `TryFnSpec`, `ApplyFns`, or `CleanOpSpec`
//! is executed with it.
//!
//! [`Resources`]: crate::Resources
/// [`Resources`] is created but not setup.
///
/// [`Resources`]: c... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/states/states_previous.rs | crate/resource_rt/src/states/states_previous.rs | use std::marker::PhantomData;
use crate::states::{ts::Previous, States, StatesCurrent};
/// Previous `State`s for all `Item`s.
///
/// This is present when an `ApplyCmd` (`EnsureCmd` or `CleanCmd`) is run,
/// whereby the current states have changed to the newly ensured states.
pub type StatesPrevious = States<Previo... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/states/states_ensured.rs | crate/resource_rt/src/states/states_ensured.rs | use std::marker::PhantomData;
use crate::states::{ts::Ensured, States, StatesCurrent};
/// Ensured `State`s for all `Item`s. `TypeMap<ItemId>` newtype.
///
/// These are the `State`s collected after `ApplyFns::exec` has been run.
///
/// # Implementors
///
/// You may reference [`StatesEnsured`] after `EnsureCmd::exe... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/states/states_goal.rs | crate/resource_rt/src/states/states_goal.rs | use std::marker::PhantomData;
use crate::states::{
ts::{Goal, GoalStored},
States,
};
/// Goal `State`s for all `Item`s.
///
/// These are the states that each item would be in, if `Item::apply` were to be
/// run with `state_goal` as the target state.
///
/// # Implementors
///
/// If an `Item`'s goal state ... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/states/states_current_stored.rs | crate/resource_rt/src/states/states_current_stored.rs | use std::marker::PhantomData;
use crate::states::{
ts::{Current, CurrentStored},
States,
};
/// Stored current `State`s for all `Item`s.
///
/// This is loaded into [`Resources`] at the beginning of any command execution,
/// from the [`StatesCurrentFile`].
///
/// This is distinct from [`StatesCurrent`] to a... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/states/ts.rs | crate/resource_rt/src/states/ts.rs | //! Type states for [`States`].
//!
//! These distinguish between the purposes of each `States` map.
//!
//! [`States`]: crate::states::States
use serde::{Deserialize, Serialize};
/// Clean / blank states of items.
///
/// Not to be confused with [`Cleaned`].
#[derive(Debug, Deserialize, Serialize)]
pub struct Clean;... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/states/states_clean.rs | crate/resource_rt/src/states/states_clean.rs | use crate::states::{ts::Clean, States};
/// Clean `State`s for all `Item`s.
///
/// These are the states that each item would be in, if `Item::apply` were to be
/// run with `state_clean` as the target state.
///
/// **Note:** Not to be confused with [`StatesCleaned`].
///
/// [`StatesCleaned`]: crate::states::StatesC... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/states/states_serde.rs | crate/resource_rt/src/states/states_serde.rs | //! Resources that track current and goal states, and state diffs.
use std::{fmt::Debug, ops::Deref};
use peace_item_model::ItemId;
use serde::Serialize;
use type_reg::{
common::UnknownEntriesSome,
untagged::{BoxDtDisplay, TypeMapOpt},
};
/// Map of `State`s for all `Item`s. `TypeMapOpt<ItemId, Item::State>`... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/states/state_diffs.rs | crate/resource_rt/src/states/state_diffs.rs | use std::ops::Deref;
use peace_fmt::{Presentable, Presenter};
use peace_item_model::ItemId;
use serde::Serialize;
use type_reg::untagged::{BoxDtDisplay, TypeMap};
use crate::internal::StateDiffsMut;
/// Diffs of `State`s for each `Item`s. `TypeMap<ItemId, BoxDtDisplay>`
/// newtype.
///
/// [`External`] fields are n... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/states/states_goal_stored.rs | crate/resource_rt/src/states/states_goal_stored.rs | use std::marker::PhantomData;
use crate::states::{
ts::{Goal, GoalStored},
States,
};
/// Stored goal `State`s for all `Item`s.
///
/// These are the states that each item would be in, if `Item::apply` were to be
/// run with `state_goal` as the target state.
///
/// This is loaded into [`Resources`] at the b... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/states/states_ensured_dry.rs | crate/resource_rt/src/states/states_ensured_dry.rs | use std::marker::PhantomData;
use crate::states::{ts::EnsuredDry, States, StatesCurrent};
/// Dry-run ensured `State`s for all `Item`s.
///
/// These are the `State`s collected after `ApplyFns::exec_dry` has been
/// run.
///
/// # Implementors
///
/// You may reference [`StatesEnsuredDry`] after `EnsureCmd::exec_dry... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/states/states_current.rs | crate/resource_rt/src/states/states_current.rs | use std::marker::PhantomData;
use crate::states::{
ts::{Current, CurrentStored},
States,
};
/// Current `State`s for all `Item`s.
///
/// This is strictly only present when the [`States`] are discovered in the
/// current execution. `States` read from the [`StatesCurrentFile`] are
/// inserted into [`Resource... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/states/states_cleaned.rs | crate/resource_rt/src/states/states_cleaned.rs | use std::marker::PhantomData;
use crate::states::{ts::Cleaned, States, StatesCurrent};
/// Cleaned `State`s for all `Item`s. `TypeMap<ItemId>` newtype.
///
/// These are the `State`s collected after `CleanOpSpec::exec` has been run.
///
/// **Note:** Not to be confused with [`StatesClean`].
///
/// [`StatesClean`]: c... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/resource_rt/src/states/states_cleaned_dry.rs | crate/resource_rt/src/states/states_cleaned_dry.rs | use std::marker::PhantomData;
use crate::states::{ts::CleanedDry, States, StatesCurrent};
/// Dry-run ensured `State`s for all `Item`s.
///
/// These are the `State`s collected after `CleanOpSpec::exec_dry` has been
/// run.
///
/// # Implementors
///
/// You may reference [`StatesCleanedDry`] after `CleanCmd::exec_d... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/flow_model/src/item_info.rs | crate/flow_model/src/item_info.rs | use peace_item_model::ItemId;
use serde::{Deserialize, Serialize};
/// Serializable representation of values used for / produced by an [`Item`].
///
/// [`Item`]: https://docs.rs/peace_cfg/latest/peace_cfg/trait.Item.html
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
pub struct ItemInfo {
/// ID o... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/flow_model/src/flow_spec_info.rs | crate/flow_model/src/flow_spec_info.rs | use dot_ix::model::{
common::{EdgeId, Edges, NodeHierarchy, NodeId, NodeNames},
info_graph::{GraphDir, GraphStyle, InfoGraph},
};
use fn_graph::{daggy::Walker, Edge, GraphInfo};
use serde::{Deserialize, Serialize};
use crate::{FlowId, ItemSpecInfo};
cfg_if::cfg_if! {
if #[cfg(feature = "output_progress")]... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/flow_model/src/lib.rs | crate/flow_model/src/lib.rs | //! Flow data model for the peace automation framework.
//!
//! This includes the serializable representation of a `Flow`. Since an actual
//! `Flow` contains logic, it currently resides in `peace_rt_model`.
// Re-exports;
pub use dot_ix;
pub use fn_graph::GraphInfo;
pub use peace_static_check_macros::flow_id;
pub us... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/flow_model/src/flow_id.rs | crate/flow_model/src/flow_id.rs | use std::borrow::Cow;
use serde::{Deserialize, Serialize};
/// Identifier or name of a process flow.
///
/// Examples are `"dev_env"` and `"artifact"` in the following snippet:
///
/// ```bash
/// peace dev_env discover # StatesDiscoverCmd
/// peace dev_env status # StatesCurrentStoredDisplayCmd
/// peace dev_env d... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/flow_model/src/flow_info.rs | crate/flow_model/src/flow_info.rs | use fn_graph::GraphInfo;
use serde::{Deserialize, Serialize};
use crate::{FlowId, ItemInfo};
/// Serializable representation of values in a [`Flow`].
///
/// This includes values passed into, or produced by `Item`s in the `Flow`.
///
/// [`Flow`]: https://docs.rs/peace_rt_model/latest/peace_rt_model/struct.Flow.html... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/flow_model/src/item_spec_info.rs | crate/flow_model/src/item_spec_info.rs | use peace_item_model::ItemId;
use serde::{Deserialize, Serialize};
/// Serializable representation of how an [`Item`] is configured.
///
/// [`Item`]: https://docs.rs/peace_cfg/latest/peace_cfg/trait.Item.html
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
pub struct ItemSpecInfo {
/// ID of the `I... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/webi_model/src/outcome_info_graph_variant.rs | crate/webi_model/src/outcome_info_graph_variant.rs | use serde::{Deserialize, Serialize};
cfg_if::cfg_if! {
if #[cfg(feature = "output_progress")] {
use std::collections::HashMap;
use peace_item_model::ItemId;
use peace_item_interaction_model::ItemLocationState;
use peace_progress_model::{CmdBlockItemInteractionType, ProgressStatus};... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/webi_model/src/flow_progress_info_graphs.rs | crate/webi_model/src/flow_progress_info_graphs.rs | use std::ops::{Deref, DerefMut};
use crate::FlowInfoGraphs;
/// Shared memory for `Map<CmdExecId, InfoGraph>`.
///
/// This is intended to be used for progress diagrams.
#[derive(Clone, Debug)]
pub struct FlowProgressInfoGraphs<K>(FlowInfoGraphs<K>);
impl<K> FlowProgressInfoGraphs<K> {
/// Returns a new `FlowPro... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/webi_model/src/lib.rs | crate/webi_model/src/lib.rs | //! Web interface data types for the peace automation framework.
pub use crate::{
flow_info_graphs::FlowInfoGraphs, flow_outcome_info_graphs::FlowOutcomeInfoGraphs,
flow_progress_info_graphs::FlowProgressInfoGraphs,
outcome_info_graph_variant::OutcomeInfoGraphVariant,
progress_info_graph_variant::Progr... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/webi_model/src/web_ui_update.rs | crate/webi_model/src/web_ui_update.rs | use serde::{Deserialize, Serialize};
cfg_if::cfg_if! {
if #[cfg(feature = "output_progress")] {
use peace_item_model::ItemId;
use peace_item_interaction_model::ItemLocationState;
use peace_progress_model::{CmdBlockItemInteractionType, ProgressLimit, ProgressStatus};
}
}
/// A message t... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/webi_model/src/flow_outcome_info_graphs.rs | crate/webi_model/src/flow_outcome_info_graphs.rs | use std::ops::{Deref, DerefMut};
use crate::FlowInfoGraphs;
/// Shared memory for `Map<CmdExecId, InfoGraph>`.
///
/// This is intended to be used for example / actual outcome diagrams.
#[derive(Clone, Debug)]
pub struct FlowOutcomeInfoGraphs<K>(FlowInfoGraphs<K>);
impl<K> FlowOutcomeInfoGraphs<K> {
/// Returns ... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/webi_model/src/flow_info_graphs.rs | crate/webi_model/src/flow_info_graphs.rs | use std::{
collections::HashMap,
ops::{Deref, DerefMut},
sync::{Arc, Mutex},
};
use dot_ix_model::info_graph::InfoGraph;
/// Shared memory for `Map<CmdExecId, InfoGraph>`.
///
/// This may be used for example/actual outcome state.
#[derive(Clone, Debug)]
pub struct FlowInfoGraphs<K>(Arc<Mutex<HashMap<K, I... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/webi_model/src/progress_info_graph_variant.rs | crate/webi_model/src/progress_info_graph_variant.rs | use indexmap::IndexSet;
use peace_item_model::ItemId;
use serde::{Deserialize, Serialize};
/// How to style the progress `InfoGraph`.
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub enum ProgressInfoGraphVariant {
/// Example `InfoGraph` diagram with no special styling.
Example,
/// Curr... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/webi_model/src/webi_error.rs | crate/webi_model/src/webi_error.rs | use std::{net::SocketAddr, path::PathBuf};
/// Errors concerning the web interface.
#[cfg_attr(feature = "error_reporting", derive(miette::Diagnostic))]
#[derive(Debug, thiserror::Error)]
pub enum WebiError {
/// Failed to create asset directory.
#[error("Failed to create asset directory: `{asset_dir}`")]
... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cfg/src/accessors.rs | crate/cfg/src/accessors.rs | pub use self::stored::Stored;
mod stored;
| rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cfg/src/lib.rs | crate/cfg/src/lib.rs | //! Configuration model for the peace automation library.
//!
//! This crate defines the API for logic and data to be used in the `peace`
//! framework.
// Re-exports
pub use async_trait::async_trait;
pub use peace_core::*;
pub use crate::{apply_check::ApplyCheck, fn_ctx::FnCtx, item::Item, state::State};
#[cfg(feat... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cfg/src/ref_into.rs | crate/cfg/src/ref_into.rs | use peace_item_interaction_model::ItemLocationState;
/// Returns `T` from a reference to `self`.
///
/// Allows setting a constraint on `Item::State`, such that `&State` can be
/// turned into an `peace_item_interaction_model::ItemLocationState`.
///
/// # Implementors
///
/// You should `impl<'state> From<&'state You... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cfg/src/fn_ctx.rs | crate/cfg/src/fn_ctx.rs | use std::marker::PhantomData;
use peace_item_model::ItemId;
#[cfg(feature = "output_progress")]
use peace_progress_model::ProgressSender;
/// References to pass information between the Peace framework and an item.
#[derive(Clone, Copy, Debug)]
pub struct FnCtx<'exec> {
/// ID of the item this belongs to.
pub... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cfg/src/state.rs | crate/cfg/src/state.rs | pub use self::{
external::{External, Fetched, Generated, Timestamped},
external_opt::{ExternalOpt, FetchedOpt, GeneratedOpt, TimestampedOpt},
nothing::Nothing,
};
mod external;
mod external_opt;
mod nothing;
use std::{any::TypeId, fmt};
use serde::{Deserialize, Serialize};
/// Logical and physical state... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cfg/src/apply_check.rs | crate/cfg/src/apply_check.rs | use serde::{Deserialize, Serialize};
#[cfg(feature = "output_progress")]
use peace_progress_model::ProgressLimit;
/// Whether the `apply` function needs to be executed.
#[derive(Copy, Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
pub enum ApplyCheck {
/// Item is not in goal state.
#[cfg(not(feature =... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cfg/src/item.rs | crate/cfg/src/item.rs | use std::fmt::{Debug, Display};
use async_trait::async_trait;
use dyn_clone::DynClone;
use peace_data::Data;
use peace_item_model::ItemId;
use peace_params::{Params, ParamsSpec};
use peace_resource_rt::{resources::ts::Empty, Resources};
use serde::{de::DeserializeOwned, Serialize};
use crate::{ApplyCheck, FnCtx};
//... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cfg/src/state/external.rs | crate/cfg/src/state/external.rs | use std::fmt::{self, Display};
use serde::{Deserialize, Serialize};
/// Physical state that is externally defined -- computed, generated, or
/// fetched.
///
/// Compared to [`ExternalOpt`], this does not have the `None` variant, to
/// indicate that the external source must return a value, and the lack of a
/// valu... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cfg/src/state/external_opt.rs | crate/cfg/src/state/external_opt.rs | use std::fmt::{self, Display};
use serde::{Deserialize, Serialize};
/// Physical state that is externally defined -- computed, generated, or
/// fetched.
///
/// Compared to [`External`], this also has a `None` variant, to indicate that
/// the external source has been queried, but it did not return a value.
///
/// ... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cfg/src/state/nothing.rs | crate/cfg/src/state/nothing.rs | use std::fmt;
use serde::{Deserialize, Serialize};
/// Represents no data.
///
/// This is used to represent no separate physical state.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub struct Nothing;
impl fmt::Display for Nothing {
fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Resu... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cfg/src/accessors/stored.rs | crate/cfg/src/accessors/stored.rs | use std::{
any::TypeId,
fmt::{Debug, Display},
marker::PhantomData,
};
use peace_data::{
fn_graph::{
resman::{BorrowFail, Ref},
DataAccess, DataAccessDyn, Resources, TypeIds,
},
Data,
};
use peace_item_model::ItemId;
use peace_resource_rt::{states::StatesCurrentStored, type_reg:... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/fmt/src/lib.rs | crate/fmt/src/lib.rs | //! Presentation and formatting support for the peace automation framework.
//!
//! See [Output Presentation].
//!
//! [Output Presentation]: https://peace.mk/book/technical_concepts/output/presentation.html
// Re-exports
pub use async_trait::async_trait;
pub use crate::{
either::Either, presentable::Presentable,... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/fmt/src/presenter.rs | crate/fmt/src/presenter.rs | use crate::{presentable::HeadingLevel, Presentable};
/// Takes a `Presentable` type and presents it to the user.
///
/// # Design
///
/// ```text
/// .--- Presentable::present(&self, presenter);
/// :
/// .--------. : .-----------. .---------------.
/// | Caller | : | Peace's ... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/fmt/src/either.rs | crate/fmt/src/either.rs | use serde::{Deserialize, Serialize};
use crate::{Presentable, Presenter};
/// Combines two different `Presentable`s into a single type.
///
/// This is useful when conditionally choosing between two distinct
/// `Presentable` types:
///
/// ```rust,ignore
/// use peace_fmt::{Either, Presentable};
///
/// let cond = t... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/fmt/src/presentable.rs | crate/fmt/src/presentable.rs | pub use self::{
bold::Bold, code_inline::CodeInline, heading::Heading, heading_level::HeadingLevel,
list_bulleted::ListBulleted, list_bulleted_aligned::ListBulletedAligned,
list_numbered::ListNumbered, list_numbered_aligned::ListNumberedAligned,
};
use serde::Serialize;
use crate::Presenter;
mod bold;
mo... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/fmt/src/presentable_ext.rs | crate/fmt/src/presentable_ext.rs | use crate::{Either, Presentable};
/// Additional functionality for `Presentable` types.
pub trait PresentableExt {
/// Wraps this `Presentable` in an `Either`, making it the left-hand variant
/// of that `Either`.
///
/// This can be used in combination with the `right_presentable` method to
/// wr... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/fmt/src/presentable/list_numbered.rs | crate/fmt/src/presentable/list_numbered.rs | use serde::{Deserialize, Serialize};
use crate::{Presentable, Presenter};
/// Presents the given iterator as a numbered list.
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
pub struct ListNumbered<P>(Vec<P>);
impl<P> ListNumbered<P> {
/// Returns a new `ListNumbered` wrapper.
pub fn new(prese... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/fmt/src/presentable/heading_level.rs | crate/fmt/src/presentable/heading_level.rs | use serde::{Deserialize, Serialize};
/// Level of conceptual detail for a given topic.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Deserialize, Serialize)]
pub enum HeadingLevel {
/// Top level heading.
Level1,
/// Second level heading.
Level2,
/// Third level heading.
Level3,
/// Fourth le... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/fmt/src/presentable/list_numbered_aligned.rs | crate/fmt/src/presentable/list_numbered_aligned.rs | use serde::{Deserialize, Serialize};
use crate::{Presentable, Presenter};
/// Presents the given iterator as an aligned numbered list.
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
pub struct ListNumberedAligned<P0, P1>(Vec<(P0, P1)>);
impl<P0, P1> ListNumberedAligned<P0, P1> {
/// Returns a new... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/fmt/src/presentable/heading.rs | crate/fmt/src/presentable/heading.rs | use serde::{Deserialize, Serialize};
use crate::{presentable::HeadingLevel, Presentable, Presenter};
/// Presents the given string as a heading.
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
pub struct Heading<P> {
/// Level of conceptual detail for a given topic.
level: HeadingLevel,
///... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/fmt/src/presentable/tuple_impl.rs | crate/fmt/src/presentable/tuple_impl.rs | use crate::{Presentable, Presenter};
#[async_trait::async_trait(?Send)]
impl<T0> Presentable for (T0,)
where
T0: Presentable,
{
async fn present<'output, PR>(&self, presenter: &mut PR) -> Result<(), PR::Error>
where
PR: Presenter<'output>,
{
self.0.present(presenter).await?;
Ok(... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/fmt/src/presentable/list_bulleted_aligned.rs | crate/fmt/src/presentable/list_bulleted_aligned.rs | use serde::{Deserialize, Serialize};
use crate::{Presentable, Presenter};
/// Presents the given iterator as an aligned bulleted list.
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
pub struct ListBulletedAligned<P0, P1>(Vec<(P0, P1)>);
impl<P0, P1> ListBulletedAligned<P0, P1> {
/// Returns a new... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/fmt/src/presentable/bold.rs | crate/fmt/src/presentable/bold.rs | use serde::{Deserialize, Serialize};
use crate::{Presentable, Presenter};
/// Presents the given presentable as bolded.
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
pub struct Bold<P>(P);
impl<P> Bold<P> {
/// Returns a new `Bold` wrapper.
pub fn new(presentable: P) -> Self {
Self(p... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/fmt/src/presentable/code_inline.rs | crate/fmt/src/presentable/code_inline.rs | use std::borrow::Cow;
use serde::{Deserialize, Serialize};
use crate::{Presentable, Presenter};
/// Presents the given string as inline code.
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
pub struct CodeInline<'s>(Cow<'s, str>);
impl<'s> CodeInline<'s> {
/// Returns a new `Code` wrapper.
pu... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/fmt/src/presentable/list_bulleted.rs | crate/fmt/src/presentable/list_bulleted.rs | use serde::{Deserialize, Serialize};
use crate::{Presentable, Presenter};
/// Presents the given iterator as a bulleted list.
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
pub struct ListBulleted<P>(Vec<P>);
impl<P> ListBulleted<P> {
/// Returns a new `ListBulleted` wrapper.
pub fn new(prese... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/profile_model/src/lib.rs | crate/profile_model/src/lib.rs | //! Serializable data model for profiles for the Peace framework.
pub use peace_static_check_macros::profile;
pub use crate::profile::{Profile, ProfileInvalidFmt};
mod profile;
| rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/profile_model/src/profile.rs | crate/profile_model/src/profile.rs | use std::borrow::Cow;
use serde::{Deserialize, Serialize};
/// Identifier or namespace to distinguish execution environments.
///
/// Example suitable identifiers are:
///
/// * `"dev_user1"`
/// * `"dev_user2"`
/// * `"prod_customer1"`
///
/// Must begin with a letter or underscore, and contain only letters, numbers... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/core/src/lib.rs | crate/core/src/lib.rs | //! Low level data types for the peace automation framework.
//!
//! This crate exists because:
//!
//! * `peace_cfg` has a dependency on `peace_resource_rt` for `Resources`, used
//! in `Item::setup`.
//! * `peace_resource_rt` has a dependency on `ItemId`, as uses `TypeMap<ItemId,
//! _>` for the `States` maps.
//... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/core/src/app_name.rs | crate/core/src/app_name.rs | use std::borrow::Cow;
use serde::{Deserialize, Serialize};
/// Name of the application that is run by end users.
///
/// This is usually the crate name of the final binary. It needs to be passed in
/// from the executable crate, as it is not possible for Peace to detect it
/// within the library itself.
///
/// Must ... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cli/src/lib.rs | crate/cli/src/lib.rs | //! Command line interface for the peace automation framework.
//!
//! This is enabled though the `"cli"` feature on the `peace` crate.
pub mod output;
| rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cli/src/output.rs | crate/cli/src/output.rs | pub use self::{
cli_colorize::CliColorize, cli_colorize_opt::CliColorizeOpt,
cli_colorize_parse_error::CliColorizeOptParseError, cli_md_presenter::CliMdPresenter,
cli_output::CliOutput, cli_output_builder::CliOutputBuilder,
cli_output_target::CliOutputTarget,
};
mod cli_colorize;
mod cli_colorize_opt;
... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cli/src/output/cli_progress_format_opt.rs | crate/cli/src/output/cli_progress_format_opt.rs | use std::str::FromStr;
use crate::output::CliProgressFormatOptParseError;
/// How to format progress on the CLI.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CliProgressFormatOpt {
/// Automatically detect whether to render a progress bar or the outcome
/// format.
Auto,
/// Render progress i... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cli/src/output/cli_colorize.rs | crate/cli/src/output/cli_colorize.rs | /// Whether or not to render output with ANSI colour codes.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CliColorize {
/// Render the output with ANSI colour codes.
Colored,
/// Render the output without ANSI colour codes.
Uncolored,
}
| rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cli/src/output/cli_colorize_opt.rs | crate/cli/src/output/cli_colorize_opt.rs | use std::str::FromStr;
use crate::output::CliColorizeOptParseError;
/// Whether to colourize output using ANSI codes on the CLI.
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
pub enum CliColorizeOpt {
/// Automatically detect whether to colourize the output.
#[default]
Auto,
/// Always colouri... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cli/src/output/cli_progress_format.rs | crate/cli/src/output/cli_progress_format.rs | /// How to format progress on the CLI.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CliProgressFormat {
/// Render progress in the same format as the outcome.
Outcome,
/// Always render progress as a progress bar.
ProgressBar,
/// Don't render progress.
None,
}
| rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cli/src/output/cli_output_builder.rs | crate/cli/src/output/cli_output_builder.rs | use std::io::IsTerminal;
use peace_cli_model::OutputFormat;
use tokio::io::{AsyncWrite, Stdout};
use crate::output::{CliColorize, CliColorizeOpt, CliOutput};
cfg_if::cfg_if! {
if #[cfg(feature = "output_progress")] {
use crate::output::{CliOutputTarget, CliProgressFormatOpt, CliProgressFormat};
}
}
... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cli/src/output/cli_colorize_parse_error.rs | crate/cli/src/output/cli_colorize_parse_error.rs | use std::fmt;
/// Failed to parse CLI colorize from string.
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct CliColorizeOptParseError(pub String);
impl fmt::Display for CliColorizeOptParseError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(
f,
"Failed to pars... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cli/src/output/cli_output.rs | crate/cli/src/output/cli_output.rs | #[cfg(unix)]
use std::fmt;
use std::fmt::Debug;
use peace_cli_model::OutputFormat;
use peace_fmt::Presentable;
use peace_rt_model_core::{async_trait, output::OutputWrite, Error, NativeError};
use serde::Serialize;
use tokio::io::{AsyncWrite, AsyncWriteExt, Stdout};
use crate::output::{CliColorize, CliMdPresenter, Cli... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | true |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cli/src/output/cli_md_presenter.rs | crate/cli/src/output/cli_md_presenter.rs | use console::Style;
use futures::stream::{self, TryStreamExt};
use peace_fmt::{async_trait, presentable::HeadingLevel, Presentable, Presenter};
use tokio::io::{AsyncWrite, AsyncWriteExt};
use crate::output::{CliColorize, CliOutput};
/// Command line markdown presenter.
///
/// Formats `Presentable` data as markdown o... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cli/src/output/cli_progress_format_opt_parse_error.rs | crate/cli/src/output/cli_progress_format_opt_parse_error.rs | use std::fmt;
/// Failed to parse CLI progress format from string.
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct CliProgressFormatOptParseError(pub String);
impl fmt::Display for CliProgressFormatOptParseError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(
f,
... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.