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/workspace_tests/src/flow_model/flow_id_invalid_fmt.rs
workspace_tests/src/flow_model/flow_id_invalid_fmt.rs
use std::borrow::Cow; use peace::flow_model::FlowIdInvalidFmt; #[test] fn debug() { let flow_id_invalid_fmt = FlowIdInvalidFmt::new(Cow::Borrowed("invalid id")); assert_eq!( r#"FlowIdInvalidFmt { value: "invalid id" }"#, format!("{flow_id_invalid_fmt:?}") ); } #[test] fn display() { ...
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/flow_id.rs
workspace_tests/src/flow_model/flow_id.rs
use std::{borrow::Cow, collections::HashMap, str::FromStr}; use peace::{ flow_model::{FlowId, FlowIdInvalidFmt}, fmt::Presentable, }; use crate::{FnInvocation, FnTrackerPresenter}; #[test] fn from_str_returns_ok_owned_for_valid_id() -> Result<(), FlowIdInvalidFmt<'static>> { let flow_id = FlowId::from_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/flow_model/flow_info.rs
workspace_tests/src/flow_model/flow_info.rs
use peace::{ data::fn_graph::{daggy::Dag, Edge, WouldCycle}, flow_model::{flow_id, FlowInfo, FlowSpecInfo, GraphInfo, ItemInfo, ItemSpecInfo}, flow_rt::{Flow, ItemGraph, ItemGraphBuilder}, item_model::item_id, }; use peace_items::blank::BlankItem; use crate::PeaceTestError; #[test] fn clone() -> Resul...
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/item_spec_info.rs
workspace_tests/src/flow_model/item_spec_info.rs
use peace::{flow_model::ItemSpecInfo, item_model::item_id}; #[test] fn clone() { let item_spec_info = ItemSpecInfo::new(item_id!("item_id")); assert_eq!(item_spec_info, Clone::clone(&item_spec_info)); } #[test] fn debug() { let item_spec_info = ItemSpecInfo::new(item_id!("item_id")); assert_eq!( ...
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/stored.rs
workspace_tests/src/cfg/stored.rs
use std::any::TypeId; use peace::{ cfg::accessors::Stored, data::{fn_graph::Resources, Data, DataAccess, DataAccessDyn, TypeIds}, item_model::{item_id, ItemId}, resource_rt::{internal::StatesMut, states::StatesCurrentStored}, }; const ITEM_SPEC_ID_TEST: &ItemId = &item_id!("item_id_test"); const 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/cfg/state.rs
workspace_tests/src/cfg/state.rs
mod external; mod external_opt; mod nothing;
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/apply_check.rs
workspace_tests/src/cfg/apply_check.rs
use peace::cfg::ApplyCheck; #[test] fn serialize() -> Result<(), serde_yaml::Error> { assert_eq!( "ExecNotRequired\n", serde_yaml::to_string(&ApplyCheck::ExecNotRequired)? ); Ok(()) } #[test] fn deserialize() -> Result<(), serde_yaml::Error> { assert_eq!( ApplyCheck::ExecNotReq...
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/app_name.rs
workspace_tests/src/cfg/app_name.rs
use std::{borrow::Cow, collections::HashMap, str::FromStr}; use peace::{ cfg::{AppName, AppNameInvalidFmt}, fmt::Presentable, }; use crate::{FnInvocation, FnTrackerPresenter}; #[test] fn from_str_returns_ok_owned_for_valid_app_name() -> Result<(), AppNameInvalidFmt<'static>> { let app_name = AppName::fro...
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/state/external.rs
workspace_tests/src/cfg/state/external.rs
use peace::cfg::state::External; #[test] fn display() { assert_eq!("u8 not yet determined", format!("{}", External::<u8>::Tbd)); assert_eq!("u8: 123", format!("{}", External::<u8>::Value(123))); } #[test] fn clone() { let external = &External::<u8>::Tbd; assert_eq!(External::<u8>::Tbd, external.clone...
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/state/external_opt.rs
workspace_tests/src/cfg/state/external_opt.rs
use peace::cfg::state::ExternalOpt; #[test] fn display() { assert_eq!( "u8 not yet determined", format!("{}", ExternalOpt::<u8>::Tbd) ); assert_eq!( "u8 does not exist on source", format!("{}", ExternalOpt::<u8>::None) ); assert_eq!("u8: 123", format!("{}", ExternalO...
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/state/nothing.rs
workspace_tests/src/cfg/state/nothing.rs
use peace::cfg::state::Nothing; #[test] fn display() { assert_eq!("", format!("{Nothing}")); } #[test] fn clone() { let nothing = &Nothing; assert_eq!(Nothing, nothing.clone()); } #[test] fn debug() { assert_eq!("Nothing", format!("{Nothing:?}")); } #[test] fn serialize() -> Result<(), Box<dyn std:...
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/sh_cmd_item.rs
workspace_tests/src/items/sh_cmd_item.rs
use peace::{ cfg::{app_name, profile}, cmd_ctx::{CmdCtxSpsf, CmdCtxTypes, ProfileSelection}, cmd_model::CmdOutcome, data::marker::Clean, flow_model::FlowId, flow_rt::{Flow, ItemGraphBuilder}, item_model::{item_id, ItemId}, rt::cmds::{CleanCmd, DiffCmd, EnsureCmd, StatesDiscoverCmd}, ...
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/tar_x_item.rs
workspace_tests/src/items/tar_x_item.rs
use std::{io::Cursor, path::PathBuf}; use peace::{ cfg::{app_name, ApplyCheck, Item}, cmd_ctx::{CmdCtxSpsf, CmdCtxSpsfFields, CmdCtxTypes, ProfileSelection}, cmd_model::CmdOutcome, data::Data, flow_model::FlowId, flow_rt::{Flow, ItemGraph, ItemGraphBuilder}, item_model::{item_id, ItemId}, ...
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/either.rs
workspace_tests/src/fmt/either.rs
use peace::{ cli::output::{CliColorizeOpt, CliMdPresenter}, fmt::{ presentable::{Bold, CodeInline}, Either, Presentable, PresentableExt, }, }; use crate::fmt::cli_output; #[tokio::test] async fn either_left_present() -> Result<(), Box<dyn std::error::Error>> { let mut cli_output = cli_...
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/presentable.rs
workspace_tests/src/fmt/presentable.rs
mod bold; mod code_inline; mod heading; mod list_bulleted; mod list_bulleted_aligned; mod list_numbered; mod list_numbered_aligned; use peace::fmt::Presentable; use crate::{FnInvocation, FnTrackerPresenter}; #[tokio::test] async fn ref_t_is_presentable_when_t_is_presentable() -> Result<(), Box<dyn std::error::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/fmt/presentable/list_numbered.rs
workspace_tests/src/fmt/presentable/list_numbered.rs
use peace::{ cli::output::{CliColorizeOpt, CliMdPresenter}, fmt::{presentable::ListNumbered, Presentable}, }; use crate::fmt::cli_output; #[tokio::test] async fn present() -> Result<(), Box<dyn std::error::Error>> { let mut cli_output = cli_output(CliColorizeOpt::Always); let mut presenter = CliMdPres...
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/presentable/list_numbered_aligned.rs
workspace_tests/src/fmt/presentable/list_numbered_aligned.rs
use peace::{ cli::output::{CliColorizeOpt, CliMdPresenter}, fmt::{ presentable::{Bold, CodeInline, ListNumberedAligned}, Presentable, }, }; use crate::fmt::cli_output; #[tokio::test] async fn present() -> Result<(), Box<dyn std::error::Error>> { let mut cli_output = cli_output(CliColor...
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/presentable/heading.rs
workspace_tests/src/fmt/presentable/heading.rs
use futures::{stream, StreamExt, TryStreamExt}; use peace::{ cli::output::{CliColorizeOpt, CliMdPresenter}, fmt::{ presentable::{CodeInline, Heading, HeadingLevel}, Presentable, }, }; use crate::fmt::cli_output; #[tokio::test] async fn present() -> Result<(), Box<dyn std::error::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/fmt/presentable/list_bulleted_aligned.rs
workspace_tests/src/fmt/presentable/list_bulleted_aligned.rs
use peace::{ cli::output::{CliColorizeOpt, CliMdPresenter}, fmt::{ presentable::{Bold, CodeInline, ListBulletedAligned}, Presentable, }, }; use crate::fmt::cli_output; #[tokio::test] async fn present() -> Result<(), Box<dyn std::error::Error>> { let mut cli_output = cli_output(CliColor...
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/presentable/bold.rs
workspace_tests/src/fmt/presentable/bold.rs
use peace::{ cli::output::{CliColorizeOpt, CliMdPresenter}, fmt::{presentable::Bold, Presentable}, }; use crate::fmt::cli_output; #[tokio::test] async fn present() -> Result<(), Box<dyn std::error::Error>> { let mut cli_output = cli_output(CliColorizeOpt::Always); let mut presenter = CliMdPresenter::n...
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/presentable/code_inline.rs
workspace_tests/src/fmt/presentable/code_inline.rs
use peace::{ cli::output::{CliColorizeOpt, CliMdPresenter}, fmt::{presentable::CodeInline, Presentable}, }; use crate::fmt::cli_output; #[tokio::test] async fn present() -> Result<(), Box<dyn std::error::Error>> { let mut cli_output = cli_output(CliColorizeOpt::Always); let mut presenter = CliMdPresen...
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/presentable/list_bulleted.rs
workspace_tests/src/fmt/presentable/list_bulleted.rs
use peace::{ cli::output::{CliColorizeOpt, CliMdPresenter}, fmt::{presentable::ListBulleted, Presentable}, }; use crate::fmt::cli_output; #[tokio::test] async fn present() -> Result<(), Box<dyn std::error::Error>> { let mut cli_output = cli_output(CliColorizeOpt::Always); let mut presenter = CliMdPres...
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/profile_invalid_fmt.rs
workspace_tests/src/profile_model/profile_invalid_fmt.rs
use std::borrow::Cow; use peace::profile_model::ProfileInvalidFmt; #[test] fn debug() { let item_id_invalid_fmt = ProfileInvalidFmt::new(Cow::Borrowed("invalid profile")); assert_eq!( r#"ProfileInvalidFmt { value: "invalid profile" }"#, format!("{item_id_invalid_fmt:?}") ); } #[test] 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/profile_model/profile.rs
workspace_tests/src/profile_model/profile.rs
use std::{borrow::Cow, collections::HashMap, str::FromStr}; use peace::{ fmt::Presentable, profile_model::{Profile, ProfileInvalidFmt}, }; use crate::{FnInvocation, FnTrackerPresenter}; #[test] fn from_str_returns_ok_owned_for_valid_profile() -> Result<(), ProfileInvalidFmt<'static>> { let profile = Prof...
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/output.rs
workspace_tests/src/cli/output.rs
mod cli_colorize_opt; mod cli_colorize_opt_parse_error; mod cli_md_presenter; mod cli_output; mod cli_output_builder; mod cli_output_target; cfg_if::cfg_if! { if #[cfg(feature = "output_progress")] { mod cli_progress_format_opt; mod cli_progress_format_opt_parse_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/cli/output/cli_progress_format_opt.rs
workspace_tests/src/cli/output/cli_progress_format_opt.rs
use std::str::FromStr; use peace::cli::output::{CliProgressFormatOpt, CliProgressFormatOptParseError}; #[test] fn from_str_returns_ok_for_auto() { assert_eq!( Ok(CliProgressFormatOpt::Auto), CliProgressFormatOpt::from_str("auto") ) } #[test] fn from_str_returns_ok_for_outcome() { assert_e...
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/output/cli_colorize_opt.rs
workspace_tests/src/cli/output/cli_colorize_opt.rs
use std::str::FromStr; use peace::cli::output::{CliColorizeOpt, CliColorizeOptParseError}; #[test] fn from_str_returns_ok_for_auto() { assert_eq!(Ok(CliColorizeOpt::Auto), CliColorizeOpt::from_str("auto")) } #[test] fn from_str_returns_ok_for_always() { assert_eq!( Ok(CliColorizeOpt::Always), ...
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/output/cli_output_builder.rs
workspace_tests/src/cli/output/cli_output_builder.rs
use peace::{ cli::output::{CliColorize, CliColorizeOpt, CliOutputBuilder}, cli_model::OutputFormat, }; #[cfg(feature = "output_progress")] use peace::cli::output::{CliOutputTarget, CliProgressFormat, CliProgressFormatOpt}; #[tokio::test] async fn new_uses_sensible_defaults() -> Result<(), Box<dyn std::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/cli/output/cli_output.rs
workspace_tests/src/cli/output/cli_output.rs
use peace::{ cfg::State, cli::output::{CliColorizeOpt, CliOutput, CliOutputBuilder}, cli_model::OutputFormat, item_model::item_id, resource_rt::{ internal::{StateDiffsMut, StatesMut}, states::{StateDiffs, StatesCurrentStored}, }, rt_model::output::OutputWrite, }; cfg_if::cfg...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
true
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/workspace_tests/src/cli/output/cli_md_presenter.rs
workspace_tests/src/cli/output/cli_md_presenter.rs
use futures::stream::{self, StreamExt, TryStreamExt}; use peace::{ cli::output::{CliMdPresenter, CliOutput, CliOutputBuilder}, cli_model::OutputFormat, fmt::{ presentable::{Bold, CodeInline, HeadingLevel}, Presenter, }, }; use peace::cli::output::CliColorizeOpt; #[tokio::test] async 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/cli/output/cli_progress_format_opt_parse_error.rs
workspace_tests/src/cli/output/cli_progress_format_opt_parse_error.rs
use peace::cli::output::CliProgressFormatOptParseError; #[test] fn display_includes_auto_output_pb_progress_bar() { let error = CliProgressFormatOptParseError("rara".to_string()); assert_eq!( "Failed to parse CLI progress format from string: `\"rara\"`.\n\ Valid values are [\"auto\", \"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/cli/output/cli_colorize_opt_parse_error.rs
workspace_tests/src/cli/output/cli_colorize_opt_parse_error.rs
use peace::cli::output::CliColorizeOptParseError; #[test] fn display_includes_auto_always_never() { let error = CliColorizeOptParseError("rara".to_string()); assert_eq!( "Failed to parse CLI colorize from string: `\"rara\"`.\n\ Valid values are [\"auto\", \"always\", \"never\"]", forma...
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/output/cli_output_target.rs
workspace_tests/src/cli/output/cli_output_target.rs
use peace::cli::output::CliOutputTarget; #[test] fn clone() { let _cli_output_target = Clone::clone(&CliOutputTarget::Stderr); } #[test] fn debug() { assert_eq!("Stderr", format!("{:?}", CliOutputTarget::Stderr)); } #[test] fn partial_eq() { assert_eq!(CliOutputTarget::Stderr, CliOutputTarget::Stderr); ...
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/w_maybe.rs
workspace_tests/src/data/w_maybe.rs
use std::any::TypeId; use peace::{ data::{accessors::WMaybe, Data, DataAccess, DataAccessDyn, Resources, TypeIds}, item_model::{item_id, ItemId}, }; const ITEM_SPEC_ID_UNUSED: &ItemId = &item_id!("test_item_id"); #[test] fn data_borrow_returns_t_when_present() { let mut resources = Resources::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/data/r_maybe.rs
workspace_tests/src/data/r_maybe.rs
use std::any::TypeId; use peace::{ data::{accessors::RMaybe, Data, DataAccess, DataAccessDyn, Resources, TypeIds}, item_model::{item_id, ItemId}, }; const ITEM_SPEC_ID_UNUSED: &ItemId = &item_id!("test_item_id"); #[test] fn data_borrow_returns_t_when_present() { let mut resources = Resources::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/data/derive.rs
workspace_tests/src/data/derive.rs
use std::{any::TypeId, marker::PhantomData}; use peace::data::{ accessors::{R, W}, Data, DataAccess, TypeIds, }; #[test] fn data_named_fields_borrows() { let mut type_ids_expected = TypeIds::new(); type_ids_expected.push(TypeId::of::<A>()); type_ids_expected.push(TypeId::of::<B>()); let 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/data/marker.rs
workspace_tests/src/data/marker.rs
use peace::data::marker::{ApplyDry, Clean, Current, Goal}; #[test] fn debug() { assert_eq!("ApplyDry(Some(1))", format!("{:?}", ApplyDry(Some(1u8)))); assert_eq!("Clean(Some(1))", format!("{:?}", Clean(Some(1u8)))); assert_eq!("Current(Some(1))", format!("{:?}", Current(Some(1u8)))); assert_eq!("Goal(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/peace_cmd_ctx_types/test_cct_fn_tracker_output.rs
workspace_tests/src/peace_cmd_ctx_types/test_cct_fn_tracker_output.rs
use peace::cmd_ctx::CmdCtxTypes; use crate::{FnTrackerOutput, PeaceTestError}; #[derive(Debug)] pub struct TestCctFnTrackerOutput; impl CmdCtxTypes for TestCctFnTrackerOutput { type AppError = PeaceTestError; type FlowParamsKey = (); type MappingFns = (); type Output = FnTrackerOutput; type Profi...
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/test_cct_no_op_output.rs
workspace_tests/src/peace_cmd_ctx_types/test_cct_no_op_output.rs
use peace::cmd_ctx::CmdCtxTypes; use crate::{NoOpOutput, PeaceTestError}; #[derive(Debug)] pub struct TestCctNoOpOutput; impl CmdCtxTypes for TestCctNoOpOutput { type AppError = PeaceTestError; type FlowParamsKey = (); type MappingFns = (); type Output = NoOpOutput; type ProfileParamsKey = (); ...
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/item_interaction.rs
workspace_tests/src/item_interaction_model/item_interaction.rs
use peace::item_interaction_model::{ ItemInteraction, ItemInteractionPull, ItemInteractionPush, ItemInteractionWithin, ItemLocation, }; mod item_interaction_pull; mod item_interaction_push; mod item_interaction_within; #[test] fn from_item_interaction_push() { let item_interaction_push = ItemInteractionPush::...
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/item_location.rs
workspace_tests/src/item_interaction_model/item_location.rs
use std::{ffi::OsStr, path::Path}; use peace::item_interaction_model::{url::ParseError, ItemLocation, ItemLocationType, Url}; #[test] fn group() { let item_location = ItemLocation::group("Cloud".to_string()); assert_eq!( ItemLocation::new( peace::item_interaction_model::ItemLocationType::...
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/item_interaction/item_interaction_pull.rs
workspace_tests/src/item_interaction_model/item_interaction/item_interaction_pull.rs
use peace::item_interaction_model::{ItemInteractionPull, ItemLocation}; #[test] fn location_client() { let item_interaction_pull = ItemInteractionPull::new( vec![ItemLocation::localhost()].into(), vec![ItemLocation::host("server".to_string())].into(), ); assert_eq!( vec![ItemLocati...
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/item_interaction/item_interaction_within.rs
workspace_tests/src/item_interaction_model/item_interaction/item_interaction_within.rs
use peace::item_interaction_model::{ItemInteractionWithin, ItemLocation}; #[test] fn location() { let item_interaction_within = ItemInteractionWithin::new(vec![ItemLocation::localhost()].into()); assert_eq!( vec![ItemLocation::localhost()], item_interaction_within.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/item_interaction_model/item_interaction/item_interaction_push.rs
workspace_tests/src/item_interaction_model/item_interaction/item_interaction_push.rs
use peace::item_interaction_model::{ItemInteractionPush, ItemLocation}; #[test] fn location_from() { let item_interaction_push = ItemInteractionPush::new( vec![ItemLocation::localhost()].into(), vec![ItemLocation::host("server".to_string())].into(), ); assert_eq!( vec![ItemLocation...
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/item_id.rs
workspace_tests/src/item_model/item_id.rs
use std::{borrow::Cow, str::FromStr}; use peace::{ fmt::Presentable, item_model::{ItemId, ItemIdInvalidFmt}, }; use crate::{FnInvocation, FnTrackerPresenter}; #[test] fn from_str_returns_ok_owned_for_valid_id() -> Result<(), ItemIdInvalidFmt<'static>> { let item_id = ItemId::from_str("good_id")?; as...
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/item_id_invalid_fmt.rs
workspace_tests/src/item_model/item_id_invalid_fmt.rs
use std::borrow::Cow; use peace::item_model::ItemIdInvalidFmt; #[test] fn debug() { let item_id_invalid_fmt = ItemIdInvalidFmt::new(Cow::Borrowed("invalid id")); assert_eq!( r#"ItemIdInvalidFmt { value: "invalid id" }"#, format!("{item_id_invalid_fmt:?}") ); } #[test] fn display() { ...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/src/lib.rs
src/lib.rs
//! 🕊️ peace -- zero stress automation // Re-exports so consumers don't need to depend on crates individually. pub use enum_iterator; #[cfg(feature = "error_reporting")] pub use miette; pub use peace_cfg as cfg; #[cfg(feature = "cli")] pub use peace_cli as cli; #[cfg(feature = "cli")] pub use peace_cli_model as cli_...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/lib.rs
examples/envman/src/lib.rs
//! Peace framework web application lifecycle example //! //! This example demonstrates management of a web application's lifecycle. This //! includes: //! //! 1. Building the application. //! 2. Starting / stopping the application in development. //! 3. Deploying / upgrading / removing the application in test servers....
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/web_components.rs
examples/envman/src/web_components.rs
#![allow(non_snake_case)] // Components are all PascalCase. pub use self::{ cmd_exec_request::CmdExecRequest, env_deploy_home::EnvDeployHome, tab_label::TabLabel, }; mod cmd_exec_request; mod env_deploy_home; mod tab_label;
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items.rs
examples/envman/src/items.rs
//! Umbrella module for items. pub mod peace_aws_iam_policy; pub mod peace_aws_iam_role; pub mod peace_aws_instance_profile; pub mod peace_aws_s3_bucket; pub mod peace_aws_s3_object; // Hack: need to find a better way to do this. #[cfg(feature = "error_reporting")] macro_rules! aws_error_desc { ($error:expr) => {...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/flows.rs
examples/envman/src/flows.rs
//! Flows that users can invoke. pub use self::{ app_upload_flow::{AppUploadFlow, AppUploadFlowParamsSpecs}, env_deploy_flow::{EnvDeployFlow, EnvDeployFlowParamsSpecs}, envman_mapping_fns::EnvmanMappingFns, }; mod app_upload_flow; mod env_deploy_flow; mod envman_mapping_fns;
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/model.rs
examples/envman/src/model.rs
//! Data structures pub use self::{ env_diff_selection::EnvDiffSelection, env_man_flow::EnvManFlow, env_man_flow_parse_error::EnvManFlowParseError, env_type::EnvType, env_type_parse_error::EnvTypeParseError, envman_error::EnvManError, item_ids::WebApp, params_keys::{ProfileParamsKey, Wo...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/main_cli.rs
examples/envman/src/main_cli.rs
use std::net::SocketAddr; use clap::Parser; use envman::{ cmds::{ CmdOpts, EnvCleanCmd, EnvDeployCmd, EnvDiffCmd, EnvDiscoverCmd, EnvGoalCmd, EnvStatusCmd, ProfileInitCmd, ProfileListCmd, ProfileShowCmd, ProfileSwitchCmd, }, model::{ cli_args::{CliArgs, EnvManCommand, ProfileCommand...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/main.rs
examples/envman/src/main.rs
cfg_if::cfg_if! { if #[cfg(feature = "cli")] { // CLI app use envman::model::EnvManError; mod main_cli; #[cfg(not(feature = "error_reporting"))] pub fn main() -> Result<(), EnvManError> { main_cli::run() } #[cfg(feature = "error_reporting")] ...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/cmds.rs
examples/envman/src/cmds.rs
//! User facing commands. //! //! These should be callable from different endpoints, e.g. CLI, or WASM. //! Each endpoint is responsible for receiving the parameters from the user. //! //! The `*Cmd` types map between the parameters received from users, to each //! `Item`'s params type. pub use self::{ app_upload_...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/output.rs
examples/envman/src/output.rs
use peace::{ cmd_model::CmdOutcome, fmt::{ presentable::{Heading, HeadingLevel}, presentln, }, item_model::ItemId, resource_rt::{resources::ts::SetUp, Resources}, rt_model::{output::OutputWrite, IndexMap}, }; use crate::model::EnvManError; /// Presents errors. pub async fn erro...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/rt_model.rs
examples/envman/src/rt_model.rs
//! Runtime data types for the EnvMan example pub use self::envman_cmd_ctx_types::EnvmanCmdCtxTypes; mod envman_cmd_ctx_types;
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/web_components/tab_label.rs
examples/envman/src/web_components/tab_label.rs
use leptos::{ callback::{Callable, Callback}, component, ev::Event, html, prelude::{ ClassAttribute, ElementChild, GlobalAttributes, NodeRef, NodeRefAttribute, OnAttribute, }, view, IntoView, }; /// The label that users click to switch to that tab. #[component] pub fn TabLabel( ...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/web_components/env_deploy_home.rs
examples/envman/src/web_components/env_deploy_home.rs
use leptos::{ component, prelude::{ClassAttribute, ElementChild, OnAttribute, ServerFnError}, server, task::spawn_local, view, IntoView, }; use peace::webi_components::{FlowGraph, FlowGraphCurrent}; use crate::web_components::TabLabel; #[server] async fn discover_cmd_exec() -> Result<(), ServerFnE...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/web_components/cmd_exec_request.rs
examples/envman/src/web_components/cmd_exec_request.rs
use serde::{Deserialize, Serialize}; /// Request for a command execution. #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] pub enum CmdExecRequest { /// Run the `StatesDiscoverCmd`. Discover, /// Run the `EnsureCmd`. Ensure, /// Run the `CleanCmd`. Clean, }
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/model/item_ids.rs
examples/envman/src/model/item_ids.rs
/// Marker type for item specs to do with deploying the web application. #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct WebApp;
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/model/env_type_parse_error.rs
examples/envman/src/model/env_type_parse_error.rs
use std::fmt; /// Failed to parse environment type from string. #[derive(Clone, Debug, PartialEq, Eq)] pub struct EnvTypeParseError(pub String); impl fmt::Display for EnvTypeParseError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!( f, r#"Failed to parse enviro...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/model/params_keys.rs
examples/envman/src/model/params_keys.rs
use peace::{ cmd_ctx::type_reg::untagged::TypeReg, enum_iterator::Sequence, params::ParamsKey, profile_model::Profile, }; use serde::{Deserialize, Serialize}; use crate::model::{EnvManFlow, EnvType}; /// Keys for workspace parameters. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Deserialize, Serialize, S...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/model/env_type.rs
examples/envman/src/model/env_type.rs
use std::str::FromStr; use peace::fmt::Presenter; use serde::{Deserialize, Serialize}; use crate::model::EnvTypeParseError; /// Type of environment: development or production. #[derive(Clone, Copy, Debug, PartialEq, Eq, Deserialize, Serialize)] pub enum EnvType { /// Development environment that runs on `localho...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/model/cli_args.rs
examples/envman/src/model/cli_args.rs
#[cfg(feature = "web_server")] use std::net::IpAddr; use clap::{Parser, Subcommand, ValueHint}; use peace::{cli::output::CliColorizeOpt, cli_model::OutputFormat, profile_model::Profile}; use semver::Version; use url::Url; use crate::model::{EnvManFlow, EnvType, RepoSlug}; #[derive(Parser)] #[clap( author, ve...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/model/env_man_flow.rs
examples/envman/src/model/env_man_flow.rs
use std::str::FromStr; use peace::fmt::Presenter; use serde::{Deserialize, Serialize}; use crate::model::EnvManFlowParseError; /// Which flow to use: application upload or environment deploy. #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Deserialize, Serialize)] pub enum EnvManFlow { /// Upload the applic...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/model/env_man_flow_parse_error.rs
examples/envman/src/model/env_man_flow_parse_error.rs
use std::fmt; /// Failed to parse flow from string. #[derive(Clone, Debug, PartialEq, Eq)] pub struct EnvManFlowParseError(pub String); impl fmt::Display for EnvManFlowParseError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!( f, r#"Failed to parse flow from st...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/model/repo_slug_error.rs
examples/envman/src/model/repo_slug_error.rs
#[cfg(feature = "error_reporting")] use peace::miette::{self, SourceSpan}; /// Error parsing a [`RepoSlug`]. /// /// [`RepoSlug`]: crate::RepoSlug #[cfg_attr(feature = "error_reporting", derive(peace::miette::Diagnostic))] #[derive(Debug, thiserror::Error)] pub enum RepoSlugError { /// Account ID provided is inval...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/model/envman_error.rs
examples/envman/src/model/envman_error.rs
use std::convert::Infallible; #[cfg(feature = "error_reporting")] use peace::miette; use peace::{ cfg::AppName, profile_model::Profile, rt_model::fn_graph::{Edge, WouldCycle}, }; /// Error while managing a web application. #[cfg_attr(feature = "error_reporting", derive(peace::miette::Diagnostic))] #[deri...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/model/repo_slug.rs
examples/envman/src/model/repo_slug.rs
use std::{fmt, str::FromStr}; #[cfg(feature = "error_reporting")] use peace::miette::SourceSpan; use serde::{Deserialize, Serialize}; use crate::model::RepoSlugError; const FORWARD_SLASH: char = '/'; /// A repository slug, e.g. `username/repo_name`. #[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] pub...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/model/profile_switch.rs
examples/envman/src/model/profile_switch.rs
use peace::profile_model::Profile; use semver::Version; use url::Url; use crate::model::{EnvType, RepoSlug}; /// Whether to switch to an existing profile or to a new one. #[derive(Clone, Debug, PartialEq, Eq)] pub enum ProfileSwitch { /// Switch to an existing profile. ToExisting { /// The existing pr...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/model/env_diff_selection.rs
examples/envman/src/model/env_diff_selection.rs
use peace::profile_model::Profile; /// What to run the diff on. /// /// Of note is, this is for showing diffs between flow states, but what is /// valuable to the user may be any combination within the following groupings. /// /// Within one profile: /// /// * previous vs current workspace params /// * previous vs cur...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/flows/env_deploy_flow.rs
examples/envman/src/flows/env_deploy_flow.rs
use std::path::PathBuf; use peace::{ cfg::app_name, flow_model::flow_id, flow_rt::{Flow, ItemGraphBuilder}, item_model::item_id, params::{Params, ParamsSpec}, profile_model::Profile, }; use peace_items::file_download::{FileDownloadItem, FileDownloadParams}; use semver::Version; use url::Url; u...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/flows/envman_mapping_fns.rs
examples/envman/src/flows/envman_mapping_fns.rs
use peace::{ enum_iterator::Sequence, params::{FromFunc, MappingFn, MappingFnId, MappingFnImpl, MappingFns}, profile_model::Profile, }; use serde::{Deserialize, Serialize}; use crate::items::{peace_aws_iam_policy::IamPolicyState, peace_aws_s3_bucket::S3BucketState}; #[derive(Debug, Clone, Copy, PartialEq,...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/flows/app_upload_flow.rs
examples/envman/src/flows/app_upload_flow.rs
use std::path::PathBuf; use peace::{ cfg::app_name, flow_model::flow_id, flow_rt::{Flow, ItemGraphBuilder}, item_model::item_id, params::{Params, ParamsSpec}, profile_model::Profile, }; use peace_items::file_download::{FileDownloadItem, FileDownloadParams}; use semver::Version; use url::Url; u...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/rt_model/envman_cmd_ctx.rs
examples/envman/src/rt_model/envman_cmd_ctx.rs
use peace::cmd_ctx::CmdCtxSpsf; use crate::rt_model::EnvmanCmdCtxTypes; /// Alias to simplify naming the `CmdCtx` type. pub type EnvManCmdCtx<'ctx, O> = CmdCtxSpsf<'_, EnvmanCmdCtxTypes<O>>;
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/rt_model/envman_cmd_ctx_types.rs
examples/envman/src/rt_model/envman_cmd_ctx_types.rs
use std::marker::PhantomData; use peace::{cmd_ctx::CmdCtxTypes, rt_model::output::OutputWrite}; use crate::{ flows::EnvmanMappingFns, model::{EnvManError, ProfileParamsKey, WorkspaceParamsKey}, }; #[derive(Debug)] pub struct EnvmanCmdCtxTypes<Output>(PhantomData<Output>); impl<Output> CmdCtxTypes for Envman...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_instance_profile.rs
examples/envman/src/items/peace_aws_instance_profile.rs
//! Copies a number from one resource to another. pub use self::{ instance_profile_apply_fns::InstanceProfileApplyFns, instance_profile_data::InstanceProfileData, instance_profile_error::InstanceProfileError, instance_profile_item::InstanceProfileItem, instance_profile_params::{ InstancePro...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_iam_policy.rs
examples/envman/src/items/peace_aws_iam_policy.rs
//! Copies a number from one resource to another. pub use self::{ iam_policy_apply_fns::IamPolicyApplyFns, iam_policy_data::IamPolicyData, iam_policy_error::IamPolicyError, iam_policy_item::IamPolicyItem, iam_policy_params::{IamPolicyParams, IamPolicyParamsFieldWise, IamPolicyParamsPartial}, ia...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_s3_object.rs
examples/envman/src/items/peace_aws_s3_object.rs
//! Uploads a file to S3. pub use self::{ s3_object_apply_fns::S3ObjectApplyFns, s3_object_data::S3ObjectData, s3_object_error::S3ObjectError, s3_object_item::S3ObjectItem, s3_object_params::{S3ObjectParams, S3ObjectParamsFieldWise, S3ObjectParamsPartial}, s3_object_state::S3ObjectState, s3...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_iam_role.rs
examples/envman/src/items/peace_aws_iam_role.rs
//! Copies a number from one resource to another. pub use self::{ iam_role_apply_fns::IamRoleApplyFns, iam_role_data::IamRoleData, iam_role_error::IamRoleError, iam_role_item::IamRoleItem, iam_role_params::{IamRoleParams, IamRoleParamsFieldWise, IamRoleParamsPartial}, iam_role_state::IamRoleSta...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_s3_bucket.rs
examples/envman/src/items/peace_aws_s3_bucket.rs
//! Copies a number from one resource to another. pub use self::{ s3_bucket_apply_fns::S3BucketApplyFns, s3_bucket_data::S3BucketData, s3_bucket_error::S3BucketError, s3_bucket_item::S3BucketItem, s3_bucket_params::{S3BucketParams, S3BucketParamsFieldWise, S3BucketParamsPartial}, s3_bucket_stat...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_s3_bucket/s3_bucket_item.rs
examples/envman/src/items/peace_aws_s3_bucket/s3_bucket_item.rs
use std::marker::PhantomData; use aws_config::BehaviorVersion; use peace::{ cfg::{async_trait, ApplyCheck, FnCtx, Item}, item_model::ItemId, params::Params, resource_rt::{resources::ts::Empty, Resources}, }; use crate::items::peace_aws_s3_bucket::{ S3BucketApplyFns, S3BucketData, S3BucketError, S3...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_s3_bucket/s3_bucket_state_diff.rs
examples/envman/src/items/peace_aws_s3_bucket/s3_bucket_state_diff.rs
use std::fmt; use serde::{Deserialize, Serialize}; /// Diff between current (dest) and goal (src) state. #[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Eq)] pub enum S3BucketStateDiff { /// S3Bucket would be added. Added, /// S3Bucket would be removed. Removed, /// S3Bucket renamed. ...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_s3_bucket/s3_bucket_error.rs
examples/envman/src/items/peace_aws_s3_bucket/s3_bucket_error.rs
use aws_sdk_s3::{ error::SdkError, operation::{ create_bucket::CreateBucketError, delete_bucket::DeleteBucketError, head_bucket::HeadBucketError, list_buckets::ListBucketsError, }, types::error::{BucketAlreadyExists, BucketAlreadyOwnedByYou}, }; #[cfg(feature = "error_reporting")] use pe...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_s3_bucket/s3_bucket_state_goal_fn.rs
examples/envman/src/items/peace_aws_s3_bucket/s3_bucket_state_goal_fn.rs
use std::marker::PhantomData; use peace::{ cfg::{state::Timestamped, FnCtx}, params::Params, }; use crate::items::peace_aws_s3_bucket::{ S3BucketData, S3BucketError, S3BucketParams, S3BucketState, }; /// Reads the goal state of the S3 bucket state. #[derive(Debug)] pub struct S3BucketStateGoalFn<Id>(Phan...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_s3_bucket/s3_bucket_state_current_fn.rs
examples/envman/src/items/peace_aws_s3_bucket/s3_bucket_state_current_fn.rs
use std::marker::PhantomData; use chrono::DateTime; use peace::{ cfg::{state::Timestamped, FnCtx}, params::Params, }; use crate::items::peace_aws_s3_bucket::{ S3BucketData, S3BucketError, S3BucketParams, S3BucketState, }; #[cfg(feature = "output_progress")] use peace::progress_model::ProgressMsgUpdate; ...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_s3_bucket/s3_bucket_state_diff_fn.rs
examples/envman/src/items/peace_aws_s3_bucket/s3_bucket_state_diff_fn.rs
use crate::items::peace_aws_s3_bucket::{S3BucketError, S3BucketState, S3BucketStateDiff}; /// Tar extraction status diff function. #[derive(Debug)] pub struct S3BucketStateDiffFn; impl S3BucketStateDiffFn { pub async fn state_diff( state_current: &S3BucketState, state_goal: &S3BucketState, ) -...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_s3_bucket/s3_bucket_params.rs
examples/envman/src/items/peace_aws_s3_bucket/s3_bucket_params.rs
use std::marker::PhantomData; use derivative::Derivative; use peace::params::Params; use serde::{Deserialize, Serialize}; /// S3Bucket item parameters. /// /// The `Id` type parameter is needed for each S3 bucket params to be a /// distinct type. /// /// # Type Parameters /// /// * `Id`: A zero-sized type used to dis...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_s3_bucket/s3_bucket_apply_fns.rs
examples/envman/src/items/peace_aws_s3_bucket/s3_bucket_apply_fns.rs
use std::marker::PhantomData; use aws_sdk_iam::error::{ProvideErrorMetadata, SdkError}; use aws_sdk_s3::{ operation::create_bucket::CreateBucketError, types::{BucketLocationConstraint, CreateBucketConfiguration}, }; use peace::cfg::{ApplyCheck, FnCtx}; #[cfg(feature = "output_progress")] use peace::progress_mo...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_s3_bucket/s3_bucket_state.rs
examples/envman/src/items/peace_aws_s3_bucket/s3_bucket_state.rs
use std::fmt; use chrono::{DateTime, Utc}; use peace::cfg::state::Timestamped; use serde::{Deserialize, Serialize}; #[cfg(feature = "output_progress")] use peace::item_interaction_model::ItemLocationState; /// S3 bucket state. #[derive(Clone, Debug, Deserialize, Serialize, PartialEq)] pub enum S3BucketState { //...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_s3_bucket/s3_bucket_data.rs
examples/envman/src/items/peace_aws_s3_bucket/s3_bucket_data.rs
use std::marker::PhantomData; use peace::data::{ accessors::{ROpt, R}, Data, }; /// Data used to manage S3 bucket state. /// /// # Type Parameters /// /// * `Id`: A zero-sized type used to distinguish different S3 bucket parameters /// from each other. #[derive(Data, Debug)] pub struct S3BucketData<'exec, I...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_s3_object/s3_object_apply_fns.rs
examples/envman/src/items/peace_aws_s3_object/s3_object_apply_fns.rs
use std::marker::PhantomData; use aws_smithy_types::byte_stream::ByteStream; use base64::Engine; use peace::cfg::{state::Generated, ApplyCheck, FnCtx}; #[cfg(feature = "output_progress")] use peace::progress_model::{ProgressLimit, ProgressMsgUpdate}; use crate::items::peace_aws_s3_object::{ S3ObjectData, S3Object...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_s3_object/s3_object_state.rs
examples/envman/src/items/peace_aws_s3_object/s3_object_state.rs
use std::fmt; use peace::cfg::state::Generated; use serde::{Deserialize, Serialize}; #[cfg(feature = "output_progress")] use peace::item_interaction_model::ItemLocationState; /// S3 object state. #[derive(Clone, Debug, Deserialize, Serialize, PartialEq)] pub enum S3ObjectState { /// S3 object does not exist. ...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_s3_object/s3_object_state_current_fn.rs
examples/envman/src/items/peace_aws_s3_object/s3_object_state_current_fn.rs
use std::marker::PhantomData; use aws_sdk_iam::error::SdkError; use aws_sdk_s3::operation::head_object::HeadObjectError; use peace::{ cfg::{state::Generated, FnCtx}, params::Params, }; use crate::items::peace_aws_s3_object::{ S3ObjectData, S3ObjectError, S3ObjectParams, S3ObjectState, }; #[cfg(feature = ...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_s3_object/s3_object_state_goal_fn.rs
examples/envman/src/items/peace_aws_s3_object/s3_object_state_goal_fn.rs
use std::{fmt::Write, marker::PhantomData, path::Path}; use peace::{ cfg::{state::Generated, FnCtx}, params::Params, }; use crate::items::peace_aws_s3_object::{ S3ObjectData, S3ObjectError, S3ObjectParams, S3ObjectState, }; #[cfg(feature = "output_progress")] use peace::progress_model::ProgressMsgUpdate;...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_s3_object/s3_object_state_diff_fn.rs
examples/envman/src/items/peace_aws_s3_object/s3_object_state_diff_fn.rs
use crate::items::peace_aws_s3_object::{S3ObjectError, S3ObjectState, S3ObjectStateDiff}; /// Tar extraction status diff function. #[derive(Debug)] pub struct S3ObjectStateDiffFn; impl S3ObjectStateDiffFn { pub async fn state_diff( state_current: &S3ObjectState, state_goal: &S3ObjectState, ) -...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_s3_object/s3_object_data.rs
examples/envman/src/items/peace_aws_s3_object/s3_object_data.rs
use std::marker::PhantomData; use peace::data::{ accessors::{ROpt, R}, Data, }; /// Data used to manage S3 object state. /// /// # Type Parameters /// /// * `Id`: A zero-sized type used to distinguish different S3 object parameters /// from each other. #[derive(Data, Debug)] pub struct S3ObjectData<'exec, I...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_s3_object/s3_object_error.rs
examples/envman/src/items/peace_aws_s3_object/s3_object_error.rs
use std::{num::ParseIntError, path::PathBuf}; use aws_sdk_s3::{ error::SdkError, operation::{ delete_object::DeleteObjectError, head_object::HeadObjectError, list_objects::ListObjectsError, put_object::PutObjectError, }, }; #[cfg(feature = "error_reporting")] use peace::miette::{self, Sourc...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false
azriel91/peace
https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/examples/envman/src/items/peace_aws_s3_object/s3_object_item.rs
examples/envman/src/items/peace_aws_s3_object/s3_object_item.rs
use std::marker::PhantomData; use aws_config::BehaviorVersion; use peace::{ cfg::{async_trait, ApplyCheck, FnCtx, Item}, item_model::ItemId, params::Params, resource_rt::{resources::ts::Empty, Resources}, }; use crate::items::peace_aws_s3_object::{ S3ObjectApplyFns, S3ObjectData, S3ObjectError, S3...
rust
Apache-2.0
5e2c43f2c0b18672749d0902d2285c703e24de97
2026-01-04T20:22:52.922300Z
false