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/cli/src/output/cli_output_target.rs | crate/cli/src/output/cli_output_target.rs | #[cfg(feature = "output_in_memory")]
use peace_rt_model_core::indicatif::InMemoryTerm;
/// Where to output progress updates to -- stdout or stderr.
///
/// This defaults to `stderr`.
///
/// # Implementation Note
///
/// `PartialEq` and `Eq` are implemented manually. For `InMemory`, equality is
/// defined by the [`co... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/data/src/accessors.rs | crate/data/src/accessors.rs | //! Accessors to fetch data from `Resources`.
//!
//! * `R<'_, T>`: Immutable access to a `T` resource.
//! * `W<'_, T>`: Mutable access to a `T` resource.
//! * `RMaybe<'_, T>`: Immutable access to a `T` resource, if it has been
//! inserted.
//! * `WMaybe<'_, T>`: Mutable access to a `T` resource, if it has been
//... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/data/src/lib.rs | crate/data/src/lib.rs | //! Data model for the peace automation framework.
// Re-exports
pub use fn_graph::{self, resman, DataAccess, DataAccessDyn, Resources, TypeIds};
pub use peace_data_derive::Data;
pub use crate::data::Data;
pub mod accessors;
pub mod marker;
mod data;
| rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/data/src/data.rs | crate/data/src/data.rs | use std::fmt::Debug;
use fn_graph::{DataAccess, DataAccessDyn, DataBorrow, Resources, R, W};
use peace_item_model::ItemId;
/// Defines the logic to instantiate and retrieve runtime data.
///
/// # Note for API Consumers
///
/// This trait is implemented by using the [`Data` derive].
///
/// [`Data` derive]: peace_dat... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/data/src/marker.rs | crate/data/src/marker.rs | //! Markers for `State`s inserted into `Resources`.
//!
//! For `SingleProfileSingleFlow` commands, `Current<Item::State>(None)` and
//! `Goal<Item::State>(None)` are inserted into `Resources` when the
//! command context is built, and automatically mutated to `Some` when either
//! `Item::state_current` or `Item::stat... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/data/src/accessors/w_maybe.rs | crate/data/src/accessors/w_maybe.rs | use std::{any::TypeId, fmt::Debug};
use fn_graph::{
resman::{BorrowFail, RefMut},
DataAccess, DataAccessDyn, Resources, TypeIds,
};
use peace_item_model::ItemId;
use crate::Data;
/// A mutable resource that may or may not exist.
///
/// For an immutable version of this, see [`RMaybe`].
///
/// [`RMaybe`]: cr... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/data/src/accessors/w_opt.rs | crate/data/src/accessors/w_opt.rs | use crate::fn_graph::W;
/// Type alias for `W<'_, Option<T>>`.
pub type WOpt<'borrow, T> = W<'borrow, Option<T>>;
| rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/data/src/accessors/r_maybe.rs | crate/data/src/accessors/r_maybe.rs | use std::{any::TypeId, fmt::Debug};
use fn_graph::{
resman::{BorrowFail, Ref},
DataAccess, DataAccessDyn, Resources, TypeIds,
};
use peace_item_model::ItemId;
use crate::Data;
/// A resource that may or may not exist.
///
/// For a mutable version of this, see [`WMaybe`].
///
/// [`WMaybe`]: crate::WMaybe
#[... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/data/src/accessors/r_opt.rs | crate/data/src/accessors/r_opt.rs | use crate::fn_graph::R;
/// Type alias for `R<'_, Option<T>>`.
pub type ROpt<'borrow, T> = R<'borrow, Option<T>>;
| rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/data/src/marker/apply_dry.rs | crate/data/src/marker/apply_dry.rs | use serde::{Deserialize, Serialize};
/// Marker for apply-dry state.
///
/// This is used for referential param values, where an item param value is
/// dependent on the state of a predecessor's state.
///
/// An `ApplyDry<Item::State>` is set to `Some` whenever an item is dry applied,
/// enabling a subsequent succes... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/data/src/marker/goal.rs | crate/data/src/marker/goal.rs | use serde::{Deserialize, Serialize};
/// Marker for goal state.
///
/// This is used for referential param values, where an item param value is
/// dependent on the state of a predecessor's state.
///
/// A `Goal<Item::State>` is set to `Some` whenever an item's goal state
/// is discovered. enabling a subsequent succ... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/data/src/marker/example.rs | crate/data/src/marker/example.rs | use serde::{Deserialize, Serialize};
/// Marker for example state.
///
/// This is used for referential param values, where an item param value is
/// dependent on the state of a predecessor's state.
///
/// An `Example<Item::State>` is set to `Some` whenever an item's example state
/// is discovered. This is used for... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/data/src/marker/clean.rs | crate/data/src/marker/clean.rs | use serde::{Deserialize, Serialize};
/// Marker for clean state.
///
/// This is used for referential param values, where an item param value is
/// dependent on the state of a predecessor's state.
///
/// A `Clean<Item::State>` is set to `Some` whenever an item's clean state is
/// needed, e.g. preparing for applying... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/data/src/marker/current.rs | crate/data/src/marker/current.rs | use serde::{Deserialize, Serialize};
/// Marker for current state.
///
/// This is used for referential param values, where an item param value is
/// dependent on the state of a predecessor's state.
///
/// A `Current<Item::State>` is set to `Some` whenever an item's current state
/// is discovered. enabling a subseq... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/rt_model_hack/src/lib.rs | crate/rt_model_hack/src/lib.rs | //! Hack to selectively enable features in target specific crates.
| rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params_derive/src/impl_default.rs | crate/params_derive/src/impl_default.rs | use syn::{Data, DeriveInput, Fields, Ident, ImplGenerics, Path, TypeGenerics, WhereClause};
use crate::util::fields_deconstruct_none;
/// Implement `Default` for the given type.
///
/// This avoids the unnecessary `Default` bound on type parameters from
/// `#[derive(Default)]`.
///
/// For enums, the variant annotat... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params_derive/src/spec_merge.rs | crate/params_derive/src/spec_merge.rs | use syn::{punctuated::Punctuated, DeriveInput, Fields, Ident, Path, Variant};
use crate::util::{
fields_deconstruct, fields_deconstruct_rename_other, fields_stmt_map, variant_match_arm,
};
pub fn spec_merge(
ast: &DeriveInput,
params_field_wise_name: &Ident,
peace_params_path: &Path,
) -> proc_macro2:... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params_derive/src/impl_from_params_for_params_partial.rs | crate/params_derive/src/impl_from_params_for_params_partial.rs | use syn::{
punctuated::Punctuated, Data, DeriveInput, Fields, Ident, ImplGenerics, TypeGenerics, Variant,
WhereClause,
};
use crate::util::{fields_deconstruct, fields_deconstruct_some, variant_match_arm};
/// `impl From<Params> for ParamsPartial`, so that users can use
/// `params_partial.try_into()` in `Item... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params_derive/src/lib.rs | crate/params_derive/src/lib.rs | #![recursion_limit = "256"]
extern crate proc_macro;
extern crate proc_macro2;
#[macro_use]
extern crate quote;
#[macro_use]
extern crate syn;
use proc_macro::TokenStream;
use quote::ToTokens;
use syn::{
Data, DeriveInput, GenericParam, Ident, ImplGenerics, Path, Type, TypeGenerics, WhereClause,
WherePredica... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params_derive/src/fields_map.rs | crate/params_derive/src/fields_map.rs | use syn::{Attribute, Field, Fields, FieldsNamed, FieldsUnnamed, Path, Type};
use crate::util::{field_spec_ty, is_phantom_data, is_serde_bound_attr};
/// Maps fields into different fields, wrapping them with the appropriate braces
/// / parenthesis if necessary.
pub fn fields_map<F>(fields: &Fields, f: F) -> Fields
wh... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params_derive/src/spec_is_usable.rs | crate/params_derive/src/spec_is_usable.rs | use syn::{punctuated::Punctuated, DeriveInput, Fields, Ident, Path, Variant};
use crate::util::{fields_deconstruct, fields_stmt_map, variant_match_arm};
pub fn is_usable_body(
ast: &DeriveInput,
params_field_wise_name: &Ident,
peace_params_path: &Path,
) -> proc_macro2::TokenStream {
match &ast.data {... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params_derive/src/type_gen_external.rs | crate/params_derive/src/type_gen_external.rs | use syn::{Attribute, DeriveInput, Ident, ImplGenerics, Type, TypeGenerics, WhereClause};
use crate::util::is_serde_bound_attr;
/// Generates a type based off an external `Value` type.
///
/// A `MyValue` wrapped type will produce:
///
/// ```rust,ignore
/// pub struct Generated(Option<MyValue>);
/// ```
///
/// This ... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params_derive/src/impl_from_params_for_params_field_wise.rs | crate/params_derive/src/impl_from_params_for_params_field_wise.rs | use syn::{
punctuated::Punctuated, DeriveInput, Fields, Ident, ImplGenerics, Path, TypeGenerics, Variant,
WhereClause,
};
use crate::util::{
field_spec_ty_deconstruct, fields_deconstruct, is_phantom_data, tuple_ident_from_field_index,
variant_match_arm,
};
/// `impl From<Params> for ParamsFieldWise`, ... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params_derive/src/impl_try_from_params_partial_for_params.rs | crate/params_derive/src/impl_try_from_params_partial_for_params.rs | use syn::{
punctuated::Punctuated, DeriveInput, Fields, Ident, ImplGenerics, TypeGenerics, Variant,
WhereClause,
};
use crate::util::{
fields_deconstruct, fields_deconstruct_some, is_phantom_data, tuple_ident_from_field_index,
variant_match_arm,
};
/// `impl TryFrom<ParamsPartial> for Params`, so that... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params_derive/src/impl_field_wise_spec_rt_for_field_wise.rs | crate/params_derive/src/impl_field_wise_spec_rt_for_field_wise.rs | use proc_macro2::Span;
use syn::{
punctuated::Punctuated, Data, DeriveInput, Field, Fields, Ident, ImplGenerics, LitInt, Path,
TypeGenerics, Variant, WhereClause,
};
use crate::util::{field_spec_ty_path, fields_deconstruct, is_phantom_data, variant_match_arm};
/// `impl FieldWiseSpecRt for ValueSpec`, so that... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params_derive/src/util.rs | crate/params_derive/src/util.rs | use proc_macro2::Span;
use syn::{
meta::ParseNestedMeta, punctuated::Punctuated, AngleBracketedGenericArguments, Attribute,
DeriveInput, Field, Fields, GenericArgument, GenericParam, Generics, Ident, LitInt, Path,
PathArguments, PathSegment, ReturnType, Type, TypeGenerics, TypePath, Variant, WhereClause,
... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params_derive/src/impl_field_wise_builder.rs | crate/params_derive/src/impl_field_wise_builder.rs | use proc_macro2::Span;
use quote::ToTokens;
use syn::{
Data, DataEnum, DeriveInput, Fields, Ident, ImplGenerics, Path, Type, TypeGenerics, WhereClause,
};
use crate::{
field_wise_enum_builder_ctx::FieldWiseEnumBuilderCtx,
fields_map::{field_to_optional_value_spec, fields_map, fields_to_optional_value_spec}... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params_derive/src/impl_value_spec_rt_for_field_wise.rs | crate/params_derive/src/impl_value_spec_rt_for_field_wise.rs | use proc_macro2::Span;
use syn::{
punctuated::Punctuated, DeriveInput, Field, Fields, Ident, ImplGenerics, LitInt, Path,
TypeGenerics, Variant, WhereClause,
};
use crate::util::{field_spec_ty, fields_deconstruct, is_phantom_data, variant_match_arm};
/// `impl ValueSpecRt for ValueSpec`, so that Peace can reso... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params_derive/src/type_gen.rs | crate/params_derive/src/type_gen.rs | use proc_macro2::Span;
use quote::ToTokens;
use syn::{
punctuated::Punctuated, Attribute, DeriveInput, Fields, Ident, ImplGenerics, TypeGenerics,
Variant, Visibility, WhereClause,
};
use crate::util::{
field_ty_to_ref_ty, fields_deconstruct, fields_deconstruct_retain, is_phantom_data,
is_serde_bound_at... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params_derive/src/impl_field_wise_spec_rt_for_field_wise_external.rs | crate/params_derive/src/impl_field_wise_spec_rt_for_field_wise_external.rs | use syn::{Ident, ImplGenerics, Path, TypeGenerics, WhereClause};
/// `impl FieldWiseSpecRt for ValueSpec`, so that Peace can resolve the params
/// type as well as its values from the spec.
pub fn impl_field_wise_spec_rt_for_field_wise_external(
generics_split: &(ImplGenerics, TypeGenerics, Option<&WhereClause>),
... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params_derive/src/impl_any_spec_rt_for_field_wise.rs | crate/params_derive/src/impl_any_spec_rt_for_field_wise.rs | use syn::{DeriveInput, Ident, ImplGenerics, Path, TypeGenerics, WhereClause};
use crate::{spec_is_usable::is_usable_body, spec_merge::spec_merge};
/// `impl AnySpecRt for ValueSpec`, so that Peace can tell if a spec is usable,
/// and merge provided and stored params together.
pub fn impl_any_spec_rt_for_field_wise(
... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params_derive/src/impl_params_merge_ext_for_params.rs | crate/params_derive/src/impl_params_merge_ext_for_params.rs | use syn::{
punctuated::Punctuated, DeriveInput, Fields, Ident, ImplGenerics, Path, TypeGenerics, Variant,
WhereClause,
};
use crate::util::{
field_name_partial, fields_deconstruct, fields_deconstruct_partial, is_phantom_data,
tuple_ident_from_field_index, variant_and_partial_match_arm,
};
/// `impl Pa... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params_derive/src/field_wise_enum_builder_ctx.rs | crate/params_derive/src/field_wise_enum_builder_ctx.rs | use syn::{Generics, Ident};
#[derive(Clone, Debug)]
pub struct FieldWiseEnumBuilderCtx {
/// The `EnumParams`' generics with `VariantSelection` inserted beforehand.
pub generics: Generics,
/// Type parameter struct name when no variant has been selected.
pub variant_none: Ident,
/// Type parameters... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/value_traits/src/lib.rs | crate/value_traits/src/lib.rs | //! Trait bounds for value types for the Peace framework.
pub use crate::app_error::AppError;
mod app_error;
| rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/value_traits/src/app_error.rs | crate/value_traits/src/app_error.rs | use std::fmt::Debug;
/// Bounds that the application error type must satisfy.
pub trait AppError: Debug + std::error::Error + Send + Sync + Unpin + 'static {}
impl<T> AppError for T where T: Debug + std::error::Error + Send + Sync + Unpin + 'static {}
| rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/item_interaction_model/src/lib.rs | crate/item_interaction_model/src/lib.rs | //! Data types for resource interactions for the Peace framework.
// Re-exports
pub use url::{self, Host, Url};
// TODO: Remove this when we have refactored where progress types live.
#[cfg(feature = "output_progress")]
pub use peace_progress_model::ItemLocationState;
pub use crate::{
item_interaction::{
... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/item_interaction_model/src/item_location_ancestors.rs | crate/item_interaction_model/src/item_location_ancestors.rs | use std::ops::{Deref, DerefMut};
use serde::{Deserialize, Serialize};
use crate::ItemLocation;
/// An [`ItemLocation`] and its ancestors.
///
/// The list of [`ItemLocation`]s within this container starts with the
/// outermost known ancestor, gradually moving closer to the innermost
/// `ItemLocation`.
#[derive(Clo... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/item_interaction_model/src/item_interactions_current.rs | crate/item_interaction_model/src/item_interactions_current.rs | use std::ops::{Deref, DerefMut};
use serde::{Deserialize, Serialize};
use crate::ItemInteraction;
/// [`ItemInteraction`]s constructed from parameters derived from fully known
/// state.
#[derive(Clone, Debug, Default, PartialEq, Eq, Deserialize, Serialize)]
pub struct ItemInteractionsCurrent(Vec<ItemInteraction>);
... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/item_interaction_model/src/item_location_tree.rs | crate/item_interaction_model/src/item_location_tree.rs | use serde::{Deserialize, Serialize};
use crate::ItemLocation;
/// An [`ItemLocation`] and its children.
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
pub struct ItemLocationTree {
/// This [`ItemLocation`].
pub item_location: ItemLocation,
/// The children of this [`ItemLocation`].
pu... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/item_interaction_model/src/item_location_type.rs | crate/item_interaction_model/src/item_location_type.rs | use serde::{Deserialize, Serialize};
/// The type of resource location.
///
/// This affects how the [`ItemLocation`] is rendered.
///
/// [`ItemLocation`]: crate::ItemLocation
#[derive(Clone, Copy, Debug, PartialEq, PartialOrd, Ord, Eq, Hash, Deserialize, Serialize)]
pub enum ItemLocationType {
/// Rendered with ... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/item_interaction_model/src/item_interactions_example.rs | crate/item_interaction_model/src/item_interactions_example.rs | use std::ops::{Deref, DerefMut};
use serde::{Deserialize, Serialize};
use crate::ItemInteraction;
/// [`ItemInteraction`]s constructed from parameters derived from at least some
/// example state.
#[derive(Clone, Debug, Default, PartialEq, Eq, Deserialize, Serialize)]
pub struct ItemInteractionsExample(Vec<ItemInter... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/item_interaction_model/src/item_interaction.rs | crate/item_interaction_model/src/item_interaction.rs | use serde::{Deserialize, Serialize};
mod item_interaction_pull;
mod item_interaction_push;
mod item_interaction_within;
pub use self::{
item_interaction_pull::ItemInteractionPull, item_interaction_push::ItemInteractionPush,
item_interaction_within::ItemInteractionWithin,
};
/// Represents the resources that ... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/item_interaction_model/src/item_interactions_current_or_example.rs | crate/item_interaction_model/src/item_interactions_current_or_example.rs | use serde::{Deserialize, Serialize};
use crate::{ItemInteractionsCurrent, ItemInteractionsExample};
/// [`ItemInteraction`]s constructed from parameters derived from at least some
/// example state.
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
pub enum ItemInteractionsCurrentOrExample {
/// [`It... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/item_interaction_model/src/item_locations_combined.rs | crate/item_interaction_model/src/item_locations_combined.rs | use std::ops::{Deref, DerefMut};
use serde::{Deserialize, Serialize};
use crate::ItemLocationTree;
/// All [`ItemLocation`]s from all items merged and deduplicated.
#[derive(Clone, Debug, Default, PartialEq, Eq, Deserialize, Serialize)]
pub struct ItemLocationsCombined(Vec<ItemLocationTree>);
impl ItemLocationsComb... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/item_interaction_model/src/item_location.rs | crate/item_interaction_model/src/item_location.rs | use std::path::Path;
use serde::{Deserialize, Serialize};
use url::Url;
use crate::ItemLocationType;
/// One layer of where a resource is located.
///
/// These will be merged into the same node based on their variant and name.
///
/// For example, if two different items provide the following
/// `ItemLocation`s:
//... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/item_interaction_model/src/item_location_state_in_progress.rs | crate/item_interaction_model/src/item_location_state_in_progress.rs | use peace_progress_model::{CmdBlockItemInteractionType, ProgressComplete, ProgressStatus};
use serde::{Deserialize, Serialize};
use crate::ItemLocationState;
/// Represents the state of an [`ItemLocation`].
///
/// This affects how the [`ItemLocation`] is rendered.
///
/// This is analogous to [`ItemLocationState`], ... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/item_interaction_model/src/item_locations_and_interactions.rs | crate/item_interaction_model/src/item_locations_and_interactions.rs | use indexmap::IndexMap;
use peace_item_model::ItemId;
use serde::{Deserialize, Serialize};
use crate::{ItemInteraction, ItemLocationTree};
#[cfg(feature = "output_progress")]
use std::collections::{HashMap, HashSet};
#[cfg(feature = "output_progress")]
use crate::ItemLocation;
/// Merged [`ItemLocation`]s and [`Ite... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/item_interaction_model/src/item_interaction/item_interaction_pull.rs | crate/item_interaction_model/src/item_interaction/item_interaction_pull.rs | use serde::{Deserialize, Serialize};
use crate::{ItemLocation, ItemLocationAncestors};
/// Represents a location-to-location pull interaction.
///
/// This can represent a file download from a server.
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
pub struct ItemInteractionPull {
/// Where the int... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/item_interaction_model/src/item_interaction/item_interaction_within.rs | crate/item_interaction_model/src/item_interaction/item_interaction_within.rs | use serde::{Deserialize, Serialize};
use crate::{ItemLocation, ItemLocationAncestors};
/// Represents a resource interaction that happens within a location.
///
/// This can represent application installation / startup happening on a
/// server.
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
pub struc... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/item_interaction_model/src/item_interaction/item_interaction_push.rs | crate/item_interaction_model/src/item_interaction/item_interaction_push.rs | use serde::{Deserialize, Serialize};
use crate::{ItemLocation, ItemLocationAncestors};
/// Represents a location-to-location push interaction.
///
/// This can represent a file transfer from one host to another.
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
pub struct ItemInteractionPush {
/// Wh... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/item_model/src/lib.rs | crate/item_model/src/lib.rs | //! Serializable data model for items for the Peace framework.
pub use peace_static_check_macros::item_id;
pub use crate::item_id::{ItemId, ItemIdInvalidFmt};
mod item_id;
| rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/item_model/src/item_id.rs | crate/item_model/src/item_id.rs | use std::borrow::Cow;
use serde::{Deserialize, Serialize};
/// Unique identifier for an [`Item`], `Cow<'static, str>` newtype.
///
/// Must begin with a letter or underscore, and contain only letters, numbers,
/// and underscores.
///
/// # Examples
///
/// The following are all examples of valid `ItemId`s:
///
/// `... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/cmd_rt.rs | workspace_tests/src/cmd_rt.rs | mod cmd_execution;
| rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/lib.rs | workspace_tests/src/lib.rs | #![cfg_attr(coverage_nightly, feature(coverage_attribute))]
#![cfg(test)]
pub(crate) use crate::{
fn_invocation::FnInvocation,
fn_name::fn_name_short,
fn_tracker_output::FnTrackerOutput,
fn_tracker_presenter::FnTrackerPresenter,
no_op_output::NoOpOutput,
peace_test_error::PeaceTestError,
ve... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/vec_copy_item.rs | workspace_tests/src/vec_copy_item.rs | use std::{
fmt,
ops::{Deref, DerefMut},
};
use diff::{Diff, VecDiff, VecDiffType};
use peace::{
cfg::{async_trait, ApplyCheck, FnCtx, Item},
data::{
accessors::{RMaybe, W},
Data,
},
item_model::{item_id, ItemId},
params::Params,
resource_rt::{resources::ts::Empty, states... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/items.rs | workspace_tests/src/items.rs | mod sh_cmd_item;
mod tar_x_item;
| rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/profile_model.rs | workspace_tests/src/profile_model.rs | mod profile;
mod profile_invalid_fmt;
| rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/item_interaction_model.rs | workspace_tests/src/item_interaction_model.rs | mod item_interaction;
mod item_location;
| rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/peace_cmd_ctx_types.rs | workspace_tests/src/peace_cmd_ctx_types.rs | pub use self::{
test_cct_fn_tracker_output::TestCctFnTrackerOutput, test_cct_no_op_output::TestCctNoOpOutput,
};
mod test_cct_fn_tracker_output;
mod test_cct_no_op_output;
| rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/diff.rs | workspace_tests/src/diff.rs | mod changeable;
mod equality;
mod maybe_eq;
mod tracked;
| rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/params.rs | workspace_tests/src/params.rs | mod any_spec_rt;
mod any_spec_rt_boxed;
mod derive;
mod field_name_and_type;
mod mapping_fn_impl;
mod params_spec;
mod params_spec_fieldless;
mod params_specs;
mod value_resolution_ctx;
mod value_resolution_mode;
mod value_spec;
| rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/progress_model.rs | workspace_tests/src/progress_model.rs | mod progress_complete;
mod progress_delta;
mod progress_limit;
mod progress_sender;
mod progress_status;
mod progress_tracker;
mod progress_update;
mod progress_update_and_id;
| rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/cmd_ctx.rs | workspace_tests/src/cmd_ctx.rs | use peace::{
cmd_ctx::type_reg::untagged::TypeReg, enum_iterator::Sequence, params::ParamsKey,
profile_model::Profile,
};
use serde::{Deserialize, Serialize};
mod cmd_ctx_mpnf;
mod cmd_ctx_mpnf_params;
mod cmd_ctx_mpsf;
mod cmd_ctx_mpsf_params;
mod cmd_ctx_npnf;
mod cmd_ctx_npnf_params;
mod cmd_ctx_spnf;
mod c... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/mock_item.rs | workspace_tests/src/mock_item.rs | use std::{
fmt,
fmt::Debug,
marker::PhantomData,
ops::{Deref, DerefMut},
};
use peace::{
cfg::{async_trait, ApplyCheck, FnCtx, Item},
data::{
accessors::{RMaybe, R, W},
Data,
},
item_model::{item_id, ItemId},
params::Params,
resource_rt::{resources::ts::Empty, st... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/cli.rs | workspace_tests/src/cli.rs | mod output;
| rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/no_op_output.rs | workspace_tests/src/no_op_output.rs | use std::convert::Infallible;
use peace::{cfg::async_trait, fmt::Presentable, rt_model::output::OutputWrite};
cfg_if::cfg_if! {
if #[cfg(feature = "output_progress")] {
use peace::{
item_interaction_model::ItemLocationState,
item_model::ItemId,
progress_model::{CmdBlock... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/rt.rs | workspace_tests/src/rt.rs | mod cmd_blocks;
mod cmds;
| rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/fn_tracker_presenter.rs | workspace_tests/src/fn_tracker_presenter.rs | use peace::fmt::{async_trait, presentable::HeadingLevel, Presentable, Presenter};
use crate::{fn_name::fn_name_short, FnInvocation};
/// Tracks `Presenter` function calls.
///
/// Formats `Presentable` data as markdown on the CLI.
#[derive(Debug, Default, PartialEq, Eq)]
pub struct FnTrackerPresenter {
/// List o... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/item_model.rs | workspace_tests/src/item_model.rs | mod item_id;
mod item_id_invalid_fmt;
| rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/fn_name.rs | workspace_tests/src/fn_name.rs | /// Returns the simple name of the function this macro is called in.
macro_rules! fn_name_short {
() => {{
fn f() {}
fn type_name_of<T>(_: T) -> &'static str {
std::any::type_name::<T>()
}
let name = type_name_of(f);
let full_name = &name[..name.len() - 3];
... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/cmd_model.rs | workspace_tests/src/cmd_model.rs | mod cmd_block_outcome;
mod cmd_execution_error;
mod cmd_outcome;
mod item_stream_outcome;
| rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/test_support.rs | workspace_tests/src/test_support.rs | use futures::stream::{self, StreamExt, TryStreamExt};
use peace::{
cfg::AppName,
flow_model::FlowId,
params::ParamsSpecs,
profile_model::Profile,
resource_rt::{
internal::{FlowParamsFile, ProfileParamsFile, WorkspaceParamsFile},
paths::{FlowDir, ParamsSpecsFile, ProfileDir},
... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/flow_model.rs | workspace_tests/src/flow_model.rs | mod flow_id;
mod flow_id_invalid_fmt;
mod flow_info;
mod flow_spec_info;
mod item_info;
mod item_spec_info;
| rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/fn_invocation.rs | workspace_tests/src/fn_invocation.rs | /// Information about a function invocation.
#[derive(Debug, PartialEq, Eq)]
pub struct FnInvocation {
/// Simple name of the function invoked.
name: &'static str,
/// Debug values of arguments to the function.
///
/// A `None` means that that arguments to the function is not tracked,
/// possib... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/resource_rt.rs | workspace_tests/src/resource_rt.rs | mod dir;
mod internal;
mod resources;
mod state_diffs;
mod states;
| rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/webi.rs | workspace_tests/src/webi.rs | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false | |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/peace_test_error.rs | workspace_tests/src/peace_test_error.rs | use std::convert::Infallible;
#[cfg(feature = "error_reporting")]
use peace::miette;
/// Error while running a workspace test.
///
/// Error type for tests that need an error for their item graphs and
/// command contexts.
#[cfg_attr(feature = "error_reporting", derive(peace::miette::Diagnostic))]
#[derive(Debug, thi... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/data.rs | workspace_tests/src/data.rs | mod derive;
mod marker;
mod r_maybe;
mod w_maybe;
| rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/cfg.rs | workspace_tests/src/cfg.rs | mod app_name;
mod apply_check;
mod state;
mod stored;
| rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/state_rt.rs | workspace_tests/src/state_rt.rs | mod states_serializer;
| rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/fmt.rs | workspace_tests/src/fmt.rs | use peace::{
cli::output::{CliColorizeOpt, CliOutput, CliOutputBuilder},
cli_model::OutputFormat,
};
mod either;
mod presentable;
/// Returns a new `CliOutput` with `OutputFormat::Text`.
fn cli_output(colorize: CliColorizeOpt) -> CliOutput<Vec<u8>> {
CliOutputBuilder::new_with_writer(Vec::new())
.... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/fn_tracker_output.rs | workspace_tests/src/fn_tracker_output.rs | use peace::{
cfg::async_trait,
fmt::Presentable,
rt_model::{self, output::OutputWrite},
};
use crate::FnInvocation;
cfg_if::cfg_if! {
if #[cfg(feature = "output_progress")] {
use peace::{
item_interaction_model::ItemLocationState,
item_model::ItemId,
progres... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/rt_model.rs | workspace_tests/src/rt_model.rs | #[cfg(feature = "error_reporting")]
mod error;
#[cfg(feature = "output_in_memory")]
mod in_memory_text_output;
mod item_boxed;
mod item_graph;
mod item_graph_builder;
mod item_wrapper;
mod native;
mod outcomes;
mod params;
mod storage;
mod workspace_dirs_builder;
| rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/params/any_spec_rt.rs | workspace_tests/src/params/any_spec_rt.rs | use peace::params::{AnySpecRt, AnySpecRtBoxed, ParamsSpec};
use crate::mock_item::MockSrc;
#[test]
fn is_usable_returns_true_for_deserialized_mapping_fn() -> Result<(), serde_yaml::Error> {
let params_spec: ParamsSpec<MockSrc> = serde_yaml::from_str(
r#"!MappingFn
field_name: !Some "field_name"
mapping_fn... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/params/value_resolution_mode.rs | workspace_tests/src/params/value_resolution_mode.rs | use peace::params::ValueResolutionMode;
#[test]
fn serialize() -> Result<(), serde_yaml::Error> {
assert_eq!(
"Current\n",
serde_yaml::to_string(&ValueResolutionMode::Current)?
);
Ok(())
}
#[test]
fn deserialize() -> Result<(), serde_yaml::Error> {
assert_eq!(
ValueResolutionMo... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/params/params_spec.rs | workspace_tests/src/params/params_spec.rs | use peace::{
enum_iterator::Sequence,
item_model::item_id,
params::{
AnySpecRt, AnySpecRtBoxed, FieldNameAndType, FieldWiseSpecRt, FromFunc, MappingFn,
MappingFnId, MappingFnImpl, MappingFnReg, MappingFns, Params, ParamsResolveError,
ParamsSpec, ValueResolutionCtx, ValueResolutionMod... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | true |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/params/any_spec_rt_boxed.rs | workspace_tests/src/params/any_spec_rt_boxed.rs | use std::any::TypeId;
use peace::{
params::{AnySpecDataType, AnySpecRtBoxed, ParamsSpec},
resource_rt::type_reg::untagged::{BoxDataTypeDowncast, DataType, DataTypeWrapper},
};
use crate::mock_item::MockSrc;
#[test]
fn clone() {
let _any_spec_rt_boxed = Clone::clone(&AnySpecRtBoxed::new(ParamsSpec::<MockS... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/params/value_resolution_ctx.rs | workspace_tests/src/params/value_resolution_ctx.rs | use peace::{
item_model::item_id,
params::{FieldNameAndType, ValueResolutionCtx, ValueResolutionMode},
};
use crate::mock_item::MockSrc;
#[test]
fn debug() {
let value_resolution_ctx = ValueResolutionCtx::new(
ValueResolutionMode::Current,
item_id!("item_id"),
tynm::type_name::<Moc... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/params/value_spec.rs | workspace_tests/src/params/value_spec.rs | use peace::{
enum_iterator::Sequence,
item_model::item_id,
params::{
AnySpecRt, AnySpecRtBoxed, FromFunc, MappingFn, MappingFnId, MappingFnImpl, MappingFnReg,
MappingFns, ParamsResolveError, ValueResolutionCtx, ValueResolutionMode, ValueSpec,
ValueSpecRt,
},
resource_rt::{res... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/params/field_name_and_type.rs | workspace_tests/src/params/field_name_and_type.rs | use peace::params::FieldNameAndType;
#[test]
fn debug() {
let field_name_and_type = FieldNameAndType::new(String::from("field"), String::from("Type"));
assert_eq!(
"FieldNameAndType { field_name: \"field\", type_name: \"Type\" }",
format!("{field_name_and_type:?}")
);
}
| rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/params/params_spec_fieldless.rs | workspace_tests/src/params/params_spec_fieldless.rs | use peace::{
enum_iterator::Sequence,
item_model::item_id,
params::{
AnySpecRt, AnySpecRtBoxed, FromFunc, MappingFn, MappingFnId, MappingFnImpl, MappingFnReg,
MappingFns, ParamsFieldless, ParamsResolveError, ParamsSpecFieldless, ValueResolutionCtx,
ValueResolutionMode, ValueSpecRt,
... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/params/derive.rs | workspace_tests/src/params/derive.rs | use peace::{
enum_iterator::Sequence,
params::{FromFunc, MappingFn, MappingFnId, MappingFnImpl, MappingFns},
};
use serde::{Deserialize, Serialize};
mod unit {
use std::any::TypeId;
use serde::{Deserialize, Serialize};
use peace::params::{Params, ParamsSpec};
#[derive(Clone, Debug, Params, S... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | true |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/params/params_specs.rs | workspace_tests/src/params/params_specs.rs | use peace::{
item_model::item_id,
params::{ParamsSpec, ParamsSpecs},
};
use crate::mock_item::MockSrc;
#[test]
fn debug() {
let mut params_specs = ParamsSpecs::new();
params_specs.insert(item_id!("item_id"), ParamsSpec::<MockSrc>::InMemory);
assert_eq!(
"ParamsSpecs({\
ItemId(\"it... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/params/mapping_fn_impl.rs | workspace_tests/src/params/mapping_fn_impl.rs | use peace::params::MappingFnImpl;
#[test]
fn debug() {
let mapping_fn_impl = MappingFnImpl::from(
#[cfg_attr(coverage_nightly, coverage(off))]
|_: &bool| None::<Option<u16>>,
);
assert_eq!(
"MappingFnImpl { \
fn_map: \"Some(Fn(&bool,) -> Option<Option<u16>>)\", \
... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/cmd_model/item_stream_outcome.rs | workspace_tests/src/cmd_model/item_stream_outcome.rs | use peace::{
cmd_model::ItemStreamOutcome, item_model::item_id, rt_model::fn_graph::StreamOutcomeState,
};
#[test]
fn map() {
let item_stream_outcome = ItemStreamOutcome::finished_with(1u16, vec![item_id!("mock")]);
let item_stream_outcome = item_stream_outcome.map(|n| n + 1);
assert_eq!(
Ite... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/cmd_model/cmd_block_outcome.rs | workspace_tests/src/cmd_model/cmd_block_outcome.rs | use peace::{
cmd_model::{CmdBlockOutcome, StreamOutcomeAndErrors, ValueAndStreamOutcome},
item_model::item_id,
rt_model::{fn_graph::StreamOutcome, IndexMap},
};
#[test]
fn is_ok() {
assert!(cmd_block_outcome_single(123).is_ok());
assert!(cmd_block_outcome_item_wise(123, None).is_ok());
assert!(... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/cmd_model/cmd_execution_error.rs | workspace_tests/src/cmd_model/cmd_execution_error.rs | #[cfg(feature = "error_reporting")]
mod input_fetch_error;
| rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/cmd_model/cmd_outcome.rs | workspace_tests/src/cmd_model/cmd_outcome.rs | use peace::{
cmd_model::{CmdOutcome, ItemStreamOutcome},
rt_model::IndexMap,
};
#[test]
fn value() {
assert_eq!(Some(123), cmd_outcome_complete(123).value().copied());
assert_eq!(
Some(123),
cmd_outcome_block_interrupted(123).value().copied()
);
assert_eq!(
Some(123),
... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/cmd_model/cmd_execution_error/input_fetch_error.rs | workspace_tests/src/cmd_model/cmd_execution_error/input_fetch_error.rs | use miette::{Diagnostic, SourceOffset, SourceSpan};
use peace::cmd_model::InputFetchError;
#[test]
fn coverage_diagnostic() {
let cmd_execution_src = String::from(
r#"CmdExecution:
ExecutionOutcome: (States<Previous>, States<Ensured>, States<Goal>)
CmdBlocks:
- StatesCurrentReadCmdBlock:
Input: S... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/progress_model/progress_limit.rs | workspace_tests/src/progress_model/progress_limit.rs | use peace::progress_model::ProgressLimit;
#[test]
fn defaults_to_unknown() {
assert_eq!(ProgressLimit::Unknown, ProgressLimit::default());
}
#[test]
fn clone() {
let progress_limit_0 = ProgressLimit::Steps(3);
let progress_limit_1 = Clone::clone(&progress_limit_0);
assert_eq!(progress_limit_0, progre... | 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.