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 |
|---|---|---|---|---|---|---|---|---|
DavidLiedle/DriftDB | https://github.com/DavidLiedle/DriftDB/blob/f0ef611fd8d3507a6dcb8c35c9eae3ff3ea30e30/crates/driftdb-client/examples/time_travel.rs | crates/driftdb-client/examples/time_travel.rs | //! Time-travel query example for DriftDB
//!
//! This example demonstrates DriftDB's unique time-travel capabilities,
//! allowing you to query historical states of your data.
//!
//! Run with:
//! ```bash
//! cargo run --example time_travel
//! ```
use driftdb_client::{Client, Result, TimeTravel};
#[tokio::main]
as... | rust | MIT | f0ef611fd8d3507a6dcb8c35c9eae3ff3ea30e30 | 2026-01-04T20:22:48.382079Z | false |
DavidLiedle/DriftDB | https://github.com/DavidLiedle/DriftDB/blob/f0ef611fd8d3507a6dcb8c35c9eae3ff3ea30e30/crates/driftdb-client/examples/typed_queries.rs | crates/driftdb-client/examples/typed_queries.rs | //! Typed queries example using serde deserialization
//!
//! This example shows how to use strongly-typed structs with DriftDB queries
//! for better type safety and ergonomics.
//!
//! Run with:
//! ```bash
//! cargo run --example typed_queries
//! ```
use driftdb_client::{Client, Result, TimeTravel};
use serde::Des... | rust | MIT | f0ef611fd8d3507a6dcb8c35c9eae3ff3ea30e30 | 2026-01-04T20:22:48.382079Z | false |
DavidLiedle/DriftDB | https://github.com/DavidLiedle/DriftDB/blob/f0ef611fd8d3507a6dcb8c35c9eae3ff3ea30e30/crates/driftdb-client/examples/parameterized_queries.rs | crates/driftdb-client/examples/parameterized_queries.rs | //! Parameterized queries example for DriftDB
//!
//! This example demonstrates safe parameterized queries that prevent SQL injection.
//! Uses client-side escaping as a workaround until the server supports full
//! parameterized queries via the extended query protocol.
//!
//! Run with:
//! ```bash
//! cargo run --exa... | rust | MIT | f0ef611fd8d3507a6dcb8c35c9eae3ff3ea30e30 | 2026-01-04T20:22:48.382079Z | false |
DavidLiedle/DriftDB | https://github.com/DavidLiedle/DriftDB/blob/f0ef611fd8d3507a6dcb8c35c9eae3ff3ea30e30/crates/driftdb-admin/src/main.rs | crates/driftdb-admin/src/main.rs | //! DriftDB Admin CLI
//!
//! Comprehensive management tool for DriftDB with:
//! - Interactive TUI dashboard
//! - Performance monitoring
//! - Backup management
//! - Replication control
//! - Schema migrations
//! - Health checks
use std::path::{Path, PathBuf};
use std::time::Duration;
use anyhow::Result;
use clap... | rust | MIT | f0ef611fd8d3507a6dcb8c35c9eae3ff3ea30e30 | 2026-01-04T20:22:48.382079Z | false |
DavidLiedle/DriftDB | https://github.com/DavidLiedle/DriftDB/blob/f0ef611fd8d3507a6dcb8c35c9eae3ff3ea30e30/examples/simple_transaction.rs | examples/simple_transaction.rs | use tempfile::TempDir;
use serde_json::json;
use time::OffsetDateTime;
use driftdb_core::{Engine, Query, QueryResult, Event, EventType};
use driftdb_core::transaction::IsolationLevel;
fn main() {
let temp_dir = TempDir::new().unwrap();
let mut engine = Engine::init(temp_dir.path()).unwrap();
// Create a ... | rust | MIT | f0ef611fd8d3507a6dcb8c35c9eae3ff3ea30e30 | 2026-01-04T20:22:48.382079Z | false |
rust-ethereum/ethereum | https://github.com/rust-ethereum/ethereum/blob/d7bdf2888253a30f160d434688e378636e253870/src/lib.rs | src/lib.rs | #![cfg_attr(not(feature = "std"), no_std)]
extern crate alloc;
mod account;
mod block;
mod enveloped;
mod header;
mod log;
mod receipt;
mod transaction;
pub mod util;
// Alias for `Vec<u8>`. This type alias is necessary for rlp-derive to work correctly.
type Bytes = alloc::vec::Vec<u8>;
pub use crate::account::Acco... | rust | Apache-2.0 | d7bdf2888253a30f160d434688e378636e253870 | 2026-01-04T20:22:49.747224Z | false |
rust-ethereum/ethereum | https://github.com/rust-ethereum/ethereum/blob/d7bdf2888253a30f160d434688e378636e253870/src/log.rs | src/log.rs | use alloc::vec::Vec;
use ethereum_types::{H160, H256};
use crate::Bytes;
#[derive(Clone, Debug, PartialEq, Eq)]
#[derive(rlp::RlpEncodable, rlp::RlpDecodable)]
#[cfg_attr(
feature = "with-scale",
derive(
scale_codec::Encode,
scale_codec::Decode,
scale_codec::DecodeWithMemTracking,
scale_info::TypeInfo
)
)... | rust | Apache-2.0 | d7bdf2888253a30f160d434688e378636e253870 | 2026-01-04T20:22:49.747224Z | false |
rust-ethereum/ethereum | https://github.com/rust-ethereum/ethereum/blob/d7bdf2888253a30f160d434688e378636e253870/src/block.rs | src/block.rs | use alloc::vec::Vec;
use ethereum_types::H256;
use rlp::{DecoderError, Rlp, RlpStream};
use sha3::{Digest, Keccak256};
use crate::{
enveloped::{EnvelopedDecodable, EnvelopedEncodable},
header::{Header, PartialHeader},
transaction::{TransactionAny, TransactionV0, TransactionV1, TransactionV2, TransactionV3},
util:... | rust | Apache-2.0 | d7bdf2888253a30f160d434688e378636e253870 | 2026-01-04T20:22:49.747224Z | false |
rust-ethereum/ethereum | https://github.com/rust-ethereum/ethereum/blob/d7bdf2888253a30f160d434688e378636e253870/src/header.rs | src/header.rs | use ethereum_types::{Bloom, H160, H256, H64, U256};
use sha3::{Digest, Keccak256};
use crate::Bytes;
/// Ethereum header definition.
#[derive(Clone, Debug, PartialEq, Eq)]
#[derive(rlp::RlpEncodable, rlp::RlpDecodable)]
#[cfg_attr(
feature = "with-scale",
derive(scale_codec::Encode, scale_codec::Decode, scale_info:... | rust | Apache-2.0 | d7bdf2888253a30f160d434688e378636e253870 | 2026-01-04T20:22:49.747224Z | false |
rust-ethereum/ethereum | https://github.com/rust-ethereum/ethereum/blob/d7bdf2888253a30f160d434688e378636e253870/src/receipt.rs | src/receipt.rs | use alloc::vec::Vec;
use bytes::BytesMut;
use ethereum_types::{Bloom, H256, U256};
use rlp::{Decodable, DecoderError, Rlp};
use crate::{
enveloped::{EnvelopedDecodable, EnvelopedDecoderError, EnvelopedEncodable},
log::Log,
};
#[derive(Clone, Debug, PartialEq, Eq)]
#[derive(rlp::RlpEncodable, rlp::RlpDecodable)]
#[... | rust | Apache-2.0 | d7bdf2888253a30f160d434688e378636e253870 | 2026-01-04T20:22:49.747224Z | false |
rust-ethereum/ethereum | https://github.com/rust-ethereum/ethereum/blob/d7bdf2888253a30f160d434688e378636e253870/src/util.rs | src/util.rs | //! Utility functions for Ethereum.
use alloc::vec::Vec;
use ethereum_types::H256;
use hash256_std_hasher::Hash256StdHasher;
use hash_db::Hasher;
use sha3::{Digest, Keccak256};
use trie_root::Value as TrieStreamValue;
/// Concrete `Hasher` impl for the Keccak-256 hash
#[derive(Default, Debug, Clone, PartialEq, Eq)]
... | rust | Apache-2.0 | d7bdf2888253a30f160d434688e378636e253870 | 2026-01-04T20:22:49.747224Z | false |
rust-ethereum/ethereum | https://github.com/rust-ethereum/ethereum/blob/d7bdf2888253a30f160d434688e378636e253870/src/enveloped.rs | src/enveloped.rs | use bytes::BytesMut;
/// DecoderError for typed transactions.
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum EnvelopedDecoderError<T> {
UnknownTypeId,
Payload(T),
}
impl<T> From<T> for EnvelopedDecoderError<T> {
fn from(e: T) -> Self {
Self::Payload(e)
}
}
/// Encodable typed transactions.
pub trait Enveloped... | rust | Apache-2.0 | d7bdf2888253a30f160d434688e378636e253870 | 2026-01-04T20:22:49.747224Z | false |
rust-ethereum/ethereum | https://github.com/rust-ethereum/ethereum/blob/d7bdf2888253a30f160d434688e378636e253870/src/account.rs | src/account.rs | use ethereum_types::{H256, U256};
#[derive(Clone, Debug, PartialEq, Eq)]
#[derive(rlp::RlpEncodable, rlp::RlpDecodable)]
#[cfg_attr(
feature = "with-scale",
derive(scale_codec::Encode, scale_codec::Decode, scale_info::TypeInfo)
)]
#[cfg_attr(feature = "with-serde", derive(serde::Serialize, serde::Deserialize))]
pub ... | rust | Apache-2.0 | d7bdf2888253a30f160d434688e378636e253870 | 2026-01-04T20:22:49.747224Z | false |
rust-ethereum/ethereum | https://github.com/rust-ethereum/ethereum/blob/d7bdf2888253a30f160d434688e378636e253870/src/transaction/signature.rs | src/transaction/signature.rs | use ethereum_types::H256;
// ECDSA signature validation constants for secp256k1 curve
/// Minimum valid value for signature components r and s (must be >= 1)
pub const SIGNATURE_LOWER_BOUND: H256 = H256([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x0... | rust | Apache-2.0 | d7bdf2888253a30f160d434688e378636e253870 | 2026-01-04T20:22:49.747224Z | false |
rust-ethereum/ethereum | https://github.com/rust-ethereum/ethereum/blob/d7bdf2888253a30f160d434688e378636e253870/src/transaction/eip2930.rs | src/transaction/eip2930.rs | use alloc::vec::Vec;
use ethereum_types::{Address, H256, U256};
use rlp::{DecoderError, Rlp, RlpStream};
use sha3::{Digest, Keccak256};
use super::signature;
use crate::Bytes;
pub use super::legacy::TransactionAction;
#[derive(Clone, Debug, PartialEq, Eq)]
#[cfg_attr(
feature = "with-scale",
derive(
scale_info:... | rust | Apache-2.0 | d7bdf2888253a30f160d434688e378636e253870 | 2026-01-04T20:22:49.747224Z | false |
rust-ethereum/ethereum | https://github.com/rust-ethereum/ethereum/blob/d7bdf2888253a30f160d434688e378636e253870/src/transaction/eip7702.rs | src/transaction/eip7702.rs | use alloc::vec::Vec;
use ethereum_types::{Address, H256, U256};
use k256::ecdsa::{RecoveryId, Signature, VerifyingKey};
use rlp::{DecoderError, Rlp, RlpStream};
use sha3::{Digest, Keccak256};
use crate::Bytes;
pub use super::eip2930::{
AccessList, MalleableTransactionSignature, TransactionAction, TransactionSignatu... | rust | Apache-2.0 | d7bdf2888253a30f160d434688e378636e253870 | 2026-01-04T20:22:49.747224Z | false |
rust-ethereum/ethereum | https://github.com/rust-ethereum/ethereum/blob/d7bdf2888253a30f160d434688e378636e253870/src/transaction/mod.rs | src/transaction/mod.rs | pub mod eip1559;
pub mod eip2930;
pub mod eip7702;
pub mod legacy;
mod signature;
use bytes::BytesMut;
use ethereum_types::H256;
use rlp::{DecoderError, Rlp};
pub use self::{
eip1559::{EIP1559Transaction, EIP1559TransactionMessage},
eip2930::{AccessList, AccessListItem, EIP2930Transaction, EIP2930TransactionMessage... | rust | Apache-2.0 | d7bdf2888253a30f160d434688e378636e253870 | 2026-01-04T20:22:49.747224Z | false |
rust-ethereum/ethereum | https://github.com/rust-ethereum/ethereum/blob/d7bdf2888253a30f160d434688e378636e253870/src/transaction/legacy.rs | src/transaction/legacy.rs | use core::ops::Deref;
use ethereum_types::{H160, H256, U256};
use rlp::{DecoderError, Rlp, RlpStream};
use sha3::{Digest, Keccak256};
use super::signature;
use crate::Bytes;
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[cfg_attr(
feature = "with-scale",
derive(
scale_codec::Encode,
scale_codec::Decode,
scal... | rust | Apache-2.0 | d7bdf2888253a30f160d434688e378636e253870 | 2026-01-04T20:22:49.747224Z | false |
rust-ethereum/ethereum | https://github.com/rust-ethereum/ethereum/blob/d7bdf2888253a30f160d434688e378636e253870/src/transaction/eip1559.rs | src/transaction/eip1559.rs | use ethereum_types::{H256, U256};
use rlp::{DecoderError, Rlp, RlpStream};
use sha3::{Digest, Keccak256};
use crate::Bytes;
pub use super::eip2930::{AccessList, TransactionAction, TransactionSignature};
#[derive(Clone, Debug, PartialEq, Eq)]
#[cfg_attr(
feature = "with-scale",
derive(
scale_codec::Encode,
scal... | rust | Apache-2.0 | d7bdf2888253a30f160d434688e378636e253870 | 2026-01-04T20:22:49.747224Z | false |
viz-rs/path-tree | https://github.com/viz-rs/path-tree/blob/b4275047bf9cdad6cd890b19d9c9d6ce9389b094/src/node.rs | src/node.rs | use alloc::{string::String, vec::Vec};
use core::{
cmp::Ordering,
fmt::{self, Write},
ops::Range,
};
use smallvec::SmallVec;
use crate::Kind;
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum Key {
String(Vec<u8>),
Parameter(Kind),
}
#[derive(Clone)]
pub struct Node<T> {
pub key: Key,
pub ... | rust | Apache-2.0 | b4275047bf9cdad6cd890b19d9c9d6ce9389b094 | 2026-01-04T20:22:55.187428Z | false |
viz-rs/path-tree | https://github.com/viz-rs/path-tree/blob/b4275047bf9cdad6cd890b19d9c9d6ce9389b094/src/lib.rs | src/lib.rs | //! path-tree is a lightweight high performance HTTP request router for Rust.
//!
//! # Example
//!
//! ```
//! use path_tree::PathTree;
//!
//! /*
//! / β’0
//! βββ api/
//! β βββ + β’13
//! βββ login β’1
//! βββ public/
//! β βββ ** β’7
//! βββ s
//! β βββ ettings β’3
//! β β βββ /
//! β β βββ : β’4
//! β... | rust | Apache-2.0 | b4275047bf9cdad6cd890b19d9c9d6ce9389b094 | 2026-01-04T20:22:55.187428Z | false |
viz-rs/path-tree | https://github.com/viz-rs/path-tree/blob/b4275047bf9cdad6cd890b19d9c9d6ce9389b094/src/parser.rs | src/parser.rs | use alloc::{string::ToString, vec::Vec};
use core::{iter::Peekable, str::CharIndices};
/// Types of path segments.
///
/// Represents the matching pattern for parameters in URL paths.
/// Different kinds determine how parameters match URL path segments.
#[derive(Clone, Copy, Debug, Eq, Ord, PartialEq, PartialOrd)]
pub... | rust | Apache-2.0 | b4275047bf9cdad6cd890b19d9c9d6ce9389b094 | 2026-01-04T20:22:55.187428Z | false |
viz-rs/path-tree | https://github.com/viz-rs/path-tree/blob/b4275047bf9cdad6cd890b19d9c9d6ce9389b094/tests/issues.rs | tests/issues.rs | use path_tree::PathTree;
#[test]
fn test_44() {
let mut tree = PathTree::new();
let _ = tree.insert("/test/:me", 0);
let _ = tree.insert("/test/:me?", 1);
let _ = tree.insert("/test/:me/now", 2);
let _ = tree.insert("/test/:me?/now", 3);
let _ = tree.insert("/test/:this+/now", 4);
let _ = t... | rust | Apache-2.0 | b4275047bf9cdad6cd890b19d9c9d6ce9389b094 | 2026-01-04T20:22:55.187428Z | false |
viz-rs/path-tree | https://github.com/viz-rs/path-tree/blob/b4275047bf9cdad6cd890b19d9c9d6ce9389b094/tests/node.rs | tests/node.rs | #![allow(clippy::too_many_lines)]
use path_tree::{Key, Kind, Node};
#[test]
fn github_nodes() {
let mut node = Node::<usize>::new(Key::String(b"/".to_vec()), None);
let mut n = node.insert_bytes(b"/");
n = n.insert_parameter(Kind::Normal);
n = n.insert_bytes(b"/");
n.insert_parameter(Kind::Normal... | rust | Apache-2.0 | b4275047bf9cdad6cd890b19d9c9d6ce9389b094 | 2026-01-04T20:22:55.187428Z | false |
viz-rs/path-tree | https://github.com/viz-rs/path-tree/blob/b4275047bf9cdad6cd890b19d9c9d6ce9389b094/tests/parser.rs | tests/parser.rs | use path_tree::{Kind, Parser, Piece, Position};
#[test]
fn parses() {
assert_eq!(
Parser::new(r"/shop/product/\::filter/color\::color/size\::size").collect::<Vec<_>>(),
[
Piece::String(b"/shop/product/".to_vec()),
Piece::String(b":".to_vec()),
Piece::Parameter(Po... | rust | Apache-2.0 | b4275047bf9cdad6cd890b19d9c9d6ce9389b094 | 2026-01-04T20:22:55.187428Z | false |
viz-rs/path-tree | https://github.com/viz-rs/path-tree/blob/b4275047bf9cdad6cd890b19d9c9d6ce9389b094/tests/tree.rs | tests/tree.rs | #![allow(unused_must_use)]
#![allow(clippy::too_many_lines)]
use path_tree::{Kind, PathTree, Piece, Position};
use rand::seq::SliceRandom;
#[test]
fn statics() {
const ROUTES: [&str; 12] = [
"/",
"/hi",
"/contact",
"/co",
"/c",
"/a",
"/ab",
"/doc/",
... | rust | Apache-2.0 | b4275047bf9cdad6cd890b19d9c9d6ce9389b094 | 2026-01-04T20:22:55.187428Z | true |
viz-rs/path-tree | https://github.com/viz-rs/path-tree/blob/b4275047bf9cdad6cd890b19d9c9d6ce9389b094/tests/fixtures/github.rs | tests/fixtures/github.rs | pub const ROUTES_WITH_COLON: [&str; 315] = [
"/app",
"/app-manifests/:code/conversions",
"/app/installations",
"/app/installations/:installation_id",
"/app/installations/:installation_id/access_tokens",
"/applications/:client_id/grants/:access_token",
"/applications/:client_id/tokens/:access... | rust | Apache-2.0 | b4275047bf9cdad6cd890b19d9c9d6ce9389b094 | 2026-01-04T20:22:55.187428Z | true |
viz-rs/path-tree | https://github.com/viz-rs/path-tree/blob/b4275047bf9cdad6cd890b19d9c9d6ce9389b094/fuzz/fuzz_targets/insert_and_find.rs | fuzz/fuzz_targets/insert_and_find.rs | #![no_main]
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: (Vec<(String, i32)>, String, Option<bool>)| {
let mut tree = path_tree::PathTree::new();
for (path, num) in &data.0 {
tree.insert(path, num);
}
match data.2 {
None => {
let _ = tree.find(&data.1);
}
... | rust | Apache-2.0 | b4275047bf9cdad6cd890b19d9c9d6ce9389b094 | 2026-01-04T20:22:55.187428Z | false |
viz-rs/path-tree | https://github.com/viz-rs/path-tree/blob/b4275047bf9cdad6cd890b19d9c9d6ce9389b094/benches/bench.rs | benches/bench.rs | #![allow(unused_must_use)]
#[path = "../tests/fixtures/github.rs"]
mod github;
use github::*;
use criterion::*;
use actix_router::{Path as ActixPath, Router as ActixRouter};
use ntex_router::{Path as NtexPath, Router as NtexRouter};
use path_table::PathTable;
use path_tree::PathTree;
use route_recognizer::Router as ... | rust | Apache-2.0 | b4275047bf9cdad6cd890b19d9c9d6ce9389b094 | 2026-01-04T20:22:55.187428Z | false |
viz-rs/path-tree | https://github.com/viz-rs/path-tree/blob/b4275047bf9cdad6cd890b19d9c9d6ce9389b094/examples/hello.rs | examples/hello.rs | #![allow(unused_must_use)]
use std::{convert::Infallible, future::Future, net::SocketAddr, pin::Pin, sync::Arc};
use bytes::Bytes;
use http_body_util::Full;
use hyper::{
body::Incoming, server::conn::http1, service::service_fn, Request, Response, StatusCode,
};
use hyper_util::rt::TokioIo;
use path_tree::PathTree... | rust | Apache-2.0 | b4275047bf9cdad6cd890b19d9c9d6ce9389b094 | 2026-01-04T20:22:55.187428Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/webi_output/src/progress_info_graph_calculator.rs | crate/webi_output/src/progress_info_graph_calculator.rs | use std::collections::HashMap;
use dot_ix_model::info_graph::InfoGraph;
use peace_flow_rt::Flow;
use peace_item_model::ItemId;
use peace_progress_model::ProgressStatus;
/// Calculates the actual `InfoGraph` for a flow's progress.
#[derive(Debug)]
pub struct ProgressInfoGraphCalculator;
impl ProgressInfoGraphCalculat... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/webi_output/src/lib.rs | crate/webi_output/src/lib.rs | //! Web interface output for the peace automation framework.
pub use crate::{
cmd_exec_spawn_ctx::CmdExecSpawnCtx, cmd_exec_to_leptos_ctx::CmdExecToLeptosCtx,
flow_webi_fns::FlowWebiFns, webi_output::WebiOutput, webi_server::WebiServer,
};
#[cfg(feature = "item_interactions")]
pub use crate::outcome_info_grap... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/webi_output/src/webi_server.rs | crate/webi_output/src/webi_server.rs | use std::{net::SocketAddr, path::Path};
use axum::Router;
use futures::stream::{self, StreamExt, TryStreamExt};
use leptos::view;
use leptos_axum::LeptosRoutes;
use peace_cmd_model::CmdExecutionId;
use peace_flow_model::FlowId;
use peace_webi_components::{App, ChildrenFn, Shell};
use peace_webi_model::{WebUiUpdate, We... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/webi_output/src/outcome_info_graph_calculator.rs | crate/webi_output/src/outcome_info_graph_calculator.rs | use std::{collections::HashMap, marker::PhantomData, str::FromStr};
use dot_ix_model::{
common::{
graphviz_attrs::{EdgeDir, PackMode, PackModeFlag},
AnyId, EdgeId, Edges, GraphvizAttrs, NodeHierarchy, NodeId, NodeNames, TagId, TagItems,
TagNames, TagStyles,
},
info_graph::{GraphDir,... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | true |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/webi_output/src/assets.rs | crate/webi_output/src/assets.rs | //! Assets to include with the shipped binary, but we can't get it bundled
//! automatically with either `trunk` or `cargo-leptos`. So we include the
//! bytes.
/// Styles shipped with `peace_webi_output`.
pub const PEACE_FAVICON_ICO: &[u8] = include_bytes!("assets/favicon.ico");
/// Provides CSS `@font-face` definit... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/webi_output/src/cmd_exec_spawn_ctx.rs | crate/webi_output/src/cmd_exec_spawn_ctx.rs | use std::fmt;
use futures::future::LocalBoxFuture;
use interruptible::InterruptSignal;
use tokio::sync::mpsc;
/// The `CmdExecution` task, as well as the channels to interact with it.
///
/// This is returned by the `CmdExecution` spawning function for each `Flow`,
/// which is registered in `WebiOutput`.
pub struct ... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/webi_output/src/flow_webi_fns.rs | crate/webi_output/src/flow_webi_fns.rs | use std::fmt::{self, Debug};
use dot_ix_model::info_graph::InfoGraph;
use futures::future::LocalBoxFuture;
use peace_flow_rt::Flow;
use peace_params::{MappingFnReg, ParamsSpecs};
use peace_resource_rt::{resources::ts::SetUp, Resources};
use crate::{CmdExecSpawnCtx, WebiOutput};
/// Functions to work with `Flow` from... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/webi_output/src/webi_output.rs | crate/webi_output/src/webi_output.rs | use std::convert::Infallible;
use peace_fmt::Presentable;
use peace_rt_model_core::{async_trait, output::OutputWrite};
use peace_webi_model::WebUiUpdate;
use tokio::sync::mpsc;
cfg_if::cfg_if! {
if #[cfg(feature = "output_progress")] {
use peace_item_model::ItemId;
use peace_item_interaction_model... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/webi_output/src/cmd_exec_to_leptos_ctx.rs | crate/webi_output/src/cmd_exec_to_leptos_ctx.rs | use std::{
collections::HashMap,
sync::{Arc, Mutex},
};
use interruptible::InterruptSignal;
use peace_cmd_model::CmdExecutionId;
use peace_flow_model::FlowId;
use tokio::sync::mpsc;
use peace_webi_model::{FlowOutcomeInfoGraphs, FlowProgressInfoGraphs};
/// The shared memory to write to to communicate between... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params/src/params_merge_ext.rs | crate/params/src/params_merge_ext.rs | use crate::Params;
/// Trait for merging `ParamsPartial` onto a `Params` object.
///
/// This is automatically implemented by [`#[derive(Params)]`].
///
/// [`#[derive(Params)]`]: peace_params_derive::Params
pub trait ParamsMergeExt: Params {
/// Moves the values from `Self::Partial` onto this `Params` object.
... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params/src/func.rs | crate/params/src/func.rs | use crate::MappingFn;
/// Provides a simpler constraint for the compiler to report to the developer.
///
/// Implemented for up to five arguments.
///
/// Instead of the detailed error message from the `From` trait:
///
/// ```md
/// the trait `From<(
/// std::option::Option<std::string::String>,
/// [closure@... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params/src/params_value.rs | crate/params/src/params_value.rs | use std::fmt::Debug;
use serde::{de::DeserializeOwned, Serialize};
/// Marker trait for a parameter value type.
///
/// This trait is automatically implemented for types that are `Clone + Debug +
/// DeserializeOwned + Serialize + Send + Sync + 'static`.
pub trait ParamsValue:
Clone + Debug + PartialEq + Deserial... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params/src/any_spec_data_type.rs | crate/params/src/any_spec_data_type.rs | #![allow(clippy::multiple_bound_locations)] // https://github.com/marcianx/downcast-rs/issues/19
use std::{any::Any, fmt};
use downcast_rs::DowncastSync;
use dyn_clone::DynClone;
use peace_resource_rt::type_reg::untagged::DataType;
use crate::AnySpecRt;
/// A [`DataType`] that is also an [`AnySpecRt`].
pub trait An... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params/src/mapping_fns.rs | crate/params/src/mapping_fns.rs | use std::{fmt::Debug, hash::Hash};
use enum_iterator::Sequence;
use serde::{de::DeserializeOwned, Serialize};
use crate::{MappingFn, MappingFnId, MappingFnImpl};
/// Enum to give versioned IDs to mapping functions, so that params specs and
/// value specs can be serialized.
///
/// Item parameters may be mapped from... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params/src/any_spec_rt.rs | crate/params/src/any_spec_rt.rs | use crate::AnySpecDataType;
/// Runtime logic of how to look up values for each field in this struct.
///
/// This trait is automatically implemented by `#[derive(Params)]` on an
/// `Item::Params`, as well as in the `peace_params` crate for standard
/// library types.
pub trait AnySpecRt {
/// Whether this `Spec`... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params/src/field_wise_spec_rt.rs | crate/params/src/field_wise_spec_rt.rs | use std::fmt::Debug;
use peace_resource_rt::{resources::ts::SetUp, Resources};
use serde::{de::DeserializeOwned, Serialize};
use crate::{AnySpecRt, MappingFnReg, ParamsResolveError, ValueResolutionCtx};
/// Runtime logic of how to look up values for each field in this struct.
///
/// This trait is automatically impl... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params/src/params_resolve_error.rs | crate/params/src/params_resolve_error.rs | use crate::{FieldNameAndType, MappingFnId, ValueResolutionCtx};
/// Failed to resolve values for a `Params` object from `resources`.
//
// TODO: Help text could be generated based on the type of `Params` -- named fields struct, tuple
// struct, enum -- instead of assuming it's always a named fields struct.
#[derive(De... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params/src/lib.rs | crate/params/src/lib.rs | #![cfg_attr(coverage_nightly, feature(coverage_attribute))]
//! Constraints and specifications for parameters for the peace automation
//! framework.
//!
//! This crate defines types and traits for implementors and users to work with
//! item params.
//!
//! # Design
//!
//! When an item is defined, implementors defin... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params/src/value_resolution_mode.rs | crate/params/src/value_resolution_mode.rs | use serde::{Deserialize, Serialize};
/// When resolving `Value`s, whether to look up `Current<T>` or `Goal<T>`.
///
/// # Design
///
/// Remember to update these places when updating here.
///
/// 1. Marker types in `crate/data/src/marker.rs`.
/// 2. `peace_params::MappingFnImpl`.
/// 3. Resource insertions in `ItemWr... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params/src/params_spec.rs | crate/params/src/params_spec.rs | use std::fmt::Debug;
use peace_resource_rt::{
resources::ts::SetUp, type_reg::untagged::BoxDataTypeDowncast, BorrowFail, Resources,
};
use serde::{de::DeserializeOwned, Deserialize, Serialize};
use crate::{
AnySpecDataType, AnySpecRt, FieldWiseSpecRt, MappingFnId, MappingFnReg, MappingFns, Params,
ParamsR... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params/src/params.rs | crate/params/src/params.rs | use std::fmt::Debug;
use serde::{de::DeserializeOwned, Serialize};
use crate::FieldWiseSpecRt;
/// Input parameters to an item.
///
/// This trait is automatically implemented by
/// `#[derive(peace::params::Params)]`.
pub trait Params: Clone + Debug + Serialize + DeserializeOwned + Send + Sync + 'static {
/// C... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params/src/any_spec_rt_boxed.rs | crate/params/src/any_spec_rt_boxed.rs | use std::ops::{Deref, DerefMut};
use peace_resource_rt::type_reg::{
untagged::{BoxDataTypeDowncast, DataType, DataTypeWrapper, FromDataType},
TypeNameLit,
};
use serde::Serialize;
use crate::{AnySpecDataType, AnySpecRt};
/// Box of a [`DataType`] that is also a [`ValueSpecRt`].
#[derive(Clone, Debug, Seriali... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params/src/value_resolution_ctx.rs | crate/params/src/value_resolution_ctx.rs | use std::fmt;
use peace_item_model::ItemId;
use serde::{Deserialize, Serialize};
use crate::{FieldNameAndType, ValueResolutionMode};
/// Collects information about how a value is resolved.
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub struct ValueResolutionCtx {
/// When resolving `Value`s, ... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params/src/params_key.rs | crate/params/src/params_key.rs | use std::{fmt::Debug, hash::Hash};
use enum_iterator::Sequence;
use peace_resource_rt::type_reg::untagged::TypeReg;
use serde::{de::DeserializeOwned, Serialize};
/// Marker trait for a parameter key type.
///
/// This trait is automatically implemented for types that are `Clone + Debug +
/// Eq + Hash + Deserialize +... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params/src/value_spec.rs | crate/params/src/value_spec.rs | use std::fmt::Debug;
use peace_resource_rt::{
resources::ts::SetUp, type_reg::untagged::BoxDataTypeDowncast, BorrowFail, Resources,
};
use serde::{de::DeserializeOwned, Deserialize, Serialize};
use crate::{
AnySpecDataType, AnySpecRt, MappingFnId, MappingFnReg, MappingFns, ParamsResolveError,
ValueResolut... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params/src/field_name_and_type.rs | crate/params/src/field_name_and_type.rs | use serde::{Deserialize, Serialize};
/// A field name and its type.
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub struct FieldNameAndType {
/// Name of the field, e.g. `my_field`.
field_name: String,
/// Name of the type, e.g. `MyField`.
type_name: String,
}
impl FieldNameAndType ... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params/src/params_spec_fieldless.rs | crate/params/src/params_spec_fieldless.rs | use std::fmt::Debug;
use peace_resource_rt::{
resources::ts::SetUp, type_reg::untagged::BoxDataTypeDowncast, BorrowFail, Resources,
};
use serde::{Deserialize, Serialize};
use crate::{
AnySpecDataType, AnySpecRt, MappingFnId, MappingFnReg, MappingFns, ParamsFieldless,
ParamsResolveError, ValueResolutionCt... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params/src/value_spec_rt.rs | crate/params/src/value_spec_rt.rs | use std::fmt::Debug;
use peace_resource_rt::{resources::ts::SetUp, Resources};
use crate::{AnySpecRt, MappingFnReg, ParamsResolveError, ValueResolutionCtx};
/// Runtime logic of how to look up values for each field in this struct.
///
/// This trait is automatically implemented by `#[derive(Params)]` on an
/// `Item... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params/src/std_impl.rs | crate/params/src/std_impl.rs | //! Trait and struct impls for standard library types.
#![allow(non_camel_case_types)]
#[cfg(not(target_arch = "wasm32"))]
use std::ffi::OsString;
use std::path::PathBuf;
use peace_params_derive::value_impl;
// IMPORTANT!
//
// When updating the types that implement `ParamsFieldless`, make sure to update
// `params_... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params/src/mapping_fn_reg.rs | crate/params/src/mapping_fn_reg.rs | use std::{
collections::HashMap,
ops::{Deref, DerefMut},
};
use crate::{MappingFn, MappingFnId, MappingFns};
/// Map of serializable [`MappingFns`] to each [`MappingFn`] logic.
///
/// This is intended to be called by the Peace framework for each tool
/// implementor's [`MappingFns`] implementation.
#[derive(... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params/src/mapping_fn_id.rs | crate/params/src/mapping_fn_id.rs | use serde::{Deserialize, Serialize};
/// ID of a mapping function. `String` newtype.
///
/// This is a string representation of a [`MappingFns`] variant, which allows
/// `*Spec`s to be serialized and deserialized and avoid:
///
/// * a `MFns: MappingFns` type parameter on each `*Spec` type -- which would
/// propag... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params/src/params_fieldless.rs | crate/params/src/params_fieldless.rs | use std::fmt::Debug;
use serde::{de::DeserializeOwned, Serialize};
/// Field of an `Item::Params`.
///
/// This trait is automatically implemented by `#[derive(Value)]`.
///
/// This is *like* the [`Params`] trait, except it does not have the `FieldWise`
/// resolution functionality.
///
/// [`Params`]: crate::Params... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params/src/mapping_fn.rs | crate/params/src/mapping_fn.rs | use std::fmt::Debug;
use peace_resource_rt::{
resources::ts::SetUp,
type_reg::untagged::{BoxDt, DataType},
Resources,
};
use serde::{Serialize, Serializer};
use crate::{MappingFnImpl, ParamsResolveError, ValueResolutionCtx};
/// Type erased mapping function.
///
/// This is used by Peace to hold type-era... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params/src/params_specs.rs | crate/params/src/params_specs.rs | use std::ops::{Deref, DerefMut};
use peace_item_model::ItemId;
use peace_resource_rt::type_reg::untagged::TypeMap;
use serde::Serialize;
use crate::AnySpecRtBoxed;
/// Map of item ID to its params' specs. `TypeMap<ItemId,
/// AnySpecRtBoxed>` newtype.
///
/// The concrete `*ValueSpec` type can be obtained by calling... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/params/src/mapping_fn_impl.rs | crate/params/src/mapping_fn_impl.rs | use std::{
fmt::{self, Debug},
marker::PhantomData,
};
use peace_data::marker::{ApplyDry, Clean, Current, Goal};
use peace_resource_rt::{resources::ts::SetUp, type_reg::untagged::BoxDt, BorrowFail, Resources};
use serde::{de::DeserializeOwned, Deserialize, Serialize, Serializer};
use crate::{
FromFunc, Fu... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cmd_model/src/item_stream_outcome.rs | crate/cmd_model/src/item_stream_outcome.rs | use fn_graph::StreamOutcomeState;
use peace_item_model::ItemId;
/// How a `Flow` stream operation ended and IDs that were processed.
///
/// Currently this is constructed by `ItemStreamOutcomeMapper`.
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct ItemStreamOutcome<T> {
/// The value of the outcome.
pub val... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cmd_model/src/lib.rs | crate/cmd_model/src/lib.rs | //! Data types for commands for the Peace framework.
//!
//! Currently contains types for better error messages.
// Re-exports
pub use fn_graph;
pub use indexmap;
pub use crate::{
cmd_block_desc::CmdBlockDesc,
cmd_block_outcome::CmdBlockOutcome,
cmd_execution_error::{CmdExecutionError, InputFetchError},
... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cmd_model/src/cmd_block_outcome.rs | crate/cmd_model/src/cmd_block_outcome.rs | use fn_graph::StreamOutcome;
use indexmap::IndexMap;
use peace_item_model::ItemId;
use crate::{StreamOutcomeAndErrors, ValueAndStreamOutcome};
/// Outcome of running `CmdBlock::exec`.
#[derive(Clone, Debug, PartialEq, Eq)]
pub enum CmdBlockOutcome<T, E> {
/// Single value returned by the command block.
///
... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cmd_model/src/cmd_execution_id.rs | crate/cmd_model/src/cmd_execution_id.rs | use std::ops::Deref;
use serde::{Deserialize, Serialize};
/// ID of a command execution.
///
/// Uniqueness is not yet defined -- these may overlap with IDs from different
/// machines.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, Serialize, Deserialize)]
pub struct CmdExecutionId(u64);
impl Cm... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cmd_model/src/stream_outcome_and_errors.rs | crate/cmd_model/src/stream_outcome_and_errors.rs | use fn_graph::StreamOutcome;
use indexmap::IndexMap;
use peace_item_model::ItemId;
/// `CmdBlock` stream outcome and item wise errors.
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct StreamOutcomeAndErrors<T, E> {
/// The `CmdBlock` stream outcome.
pub stream_outcome: StreamOutcome<T>,
/// The errors dur... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cmd_model/src/value_and_stream_outcome.rs | crate/cmd_model/src/value_and_stream_outcome.rs | use fn_graph::StreamOutcome;
/// `CmdBlock` outcome value on success, and its `StreamOutcome` if applicable.
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct ValueAndStreamOutcome<T> {
/// The value returned by the `CmdBlock`.
pub value: T,
/// If the block streams each item in its logic, then this contai... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cmd_model/src/cmd_block_desc.rs | crate/cmd_model/src/cmd_block_desc.rs | /// String representation of the `CmdBlock` in a `CmdExecution`.
///
/// This is used to provide a well-formatted error message so that developers
/// can identify where a bug lies more easily.
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct CmdBlockDesc {
/// Short name of the command block.
cmd_block_name: ... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cmd_model/src/cmd_execution_error.rs | crate/cmd_model/src/cmd_execution_error.rs | use std::fmt::Debug;
pub use self::input_fetch_error::InputFetchError;
mod input_fetch_error;
/// Error while executing a `CmdBlock`.
///
/// # Type Parameters
///
/// * `E`: Application error type.
#[cfg_attr(feature = "error_reporting", derive(miette::Diagnostic))]
#[derive(Debug, thiserror::Error)]
pub enum CmdEx... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cmd_model/src/cmd_outcome.rs | crate/cmd_model/src/cmd_outcome.rs | use futures::Future;
use indexmap::IndexMap;
use peace_item_model::ItemId;
use crate::{CmdBlockDesc, ItemStreamOutcome};
/// Outcome of a [`CmdExecution`].
///
/// The variants indicate whether execution was successful, interrupted, or
/// errored when processing an item.
///
/// [`CmdExecution`]: https://docs.rs/pea... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/cmd_model/src/cmd_execution_error/input_fetch_error.rs | crate/cmd_model/src/cmd_execution_error/input_fetch_error.rs | use crate::CmdBlockDesc;
/// Error fetching `CmdBlock::InputT` from `resources`.
///
/// If `CmdBlock::InputT` is a tuple, such as `(StatesCurrent, StatesGoal)`,
/// and `states_current` and `states_goal` are inserted individually in
/// `Resources`, then `CmdBlock::input_fetch` should be implemented to call
/// `Reso... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/rt_model_core/src/lib.rs | crate/rt_model_core/src/lib.rs | //! Core runtime traits for the peace automation framework.
//!
//! These types are in this crate so that the `rt_model_native` and
//! `rt_model_web` crates are able to reference them and either use or provide
//! default implementations.
// Re-exports
pub use async_trait::async_trait;
pub use indexmap::IndexMap;
pub... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/rt_model_core/src/params.rs | crate/rt_model_core/src/params.rs | //! Serializable data to initialize resources in a `CmdContext`.
//!
//! Each of these are `TypeMap<T>` newtypes, and are:
//!
//! * automatically serialized when a `CmdContext` is created with params.
//! * automatically deserialized and inserted as resources when subsequent
//! `CmdContext`s are created.
//!
//! # ... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/rt_model_core/src/error.rs | crate/rt_model_core/src/error.rs | use std::path::PathBuf;
use peace_cmd_model::CmdExecutionError;
use peace_core::AppName;
use peace_flow_model::FlowId;
use peace_item_model::ItemId;
use peace_params::{ParamsResolveError, ParamsSpecs};
use peace_profile_model::Profile;
use peace_resource_rt::{internal::WorkspaceParamsFile, paths::ParamsSpecsFile};
pu... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/rt_model_core/src/items_state_stored_stale.rs | crate/rt_model_core/src/items_state_stored_stale.rs | use std::ops::{Deref, DerefMut};
use indexmap::IndexMap;
use peace_item_model::ItemId;
use crate::StateStoredAndDiscovered;
/// Items whose stored and discovered state are not equal.
///
/// `IndexMap<ItemId, StateStoredAndDiscovered>` newtype.
///
/// This can be used for either current state or goal state.
#[deriv... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/rt_model_core/src/output.rs | crate/rt_model_core/src/output.rs | pub use self::output_write::OutputWrite;
mod output_write;
| rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/rt_model_core/src/state_stored_and_discovered.rs | crate/rt_model_core/src/state_stored_and_discovered.rs | use type_reg::untagged::BoxDtDisplay;
/// Stored and/or discovered state for an item.
#[derive(Clone, Debug)]
pub enum StateStoredAndDiscovered {
/// Stored state exists, but the actual item state cannot be discovered.
///
/// These can probably be ignored during `CleanCmd`, for idempotence even if
///... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/rt_model_core/src/cmd_progress_tracker.rs | crate/rt_model_core/src/cmd_progress_tracker.rs | use indexmap::IndexMap;
use indicatif::MultiProgress;
use peace_item_model::ItemId;
use peace_progress_model::ProgressTracker;
/// Tracks command execution progress for all items.
///
/// The Peace framework initializes the `multi_progress` and `progress_trackers`
/// and manages updating the `ProgressBar` values.
///... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/rt_model_core/src/params/workspace_params.rs | crate/rt_model_core/src/params/workspace_params.rs | use std::{
hash::Hash,
marker::PhantomData,
ops::{Deref, DerefMut},
};
use serde::Serialize;
use type_reg::untagged::{BoxDt, TypeMap};
/// Information that is shared across all profiles and flows in a workspace.
/// `TypeMap<K>` newtype.
///
/// Shared information are the ones that will not change when sw... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/rt_model_core/src/params/flow_params.rs | crate/rt_model_core/src/params/flow_params.rs | use std::{
hash::Hash,
marker::PhantomData,
ops::{Deref, DerefMut},
};
use serde::Serialize;
use type_reg::untagged::{BoxDt, TypeMap};
/// Information that is applicable to a flow. `TypeMap<K>` newtype.
///
/// The information may not be of the same type across flows, as flows are
/// different in what th... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/rt_model_core/src/params/params_keys.rs | crate/rt_model_core/src/params/params_keys.rs | use std::{fmt::Debug, hash::Hash, marker::PhantomData};
use serde::{de::DeserializeOwned, Deserialize, Serialize};
/// Marks the types used for params keys.
///
/// # Design
///
/// This allows types such as `CmdContext` and `ParamsTypeRegs` to have a
/// `ParamsKeys` type parameter without specifying all of the asso... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/rt_model_core/src/params/params_type_regs_builder.rs | crate/rt_model_core/src/params/params_type_regs_builder.rs | use std::{fmt::Debug, hash::Hash};
use serde::{de::DeserializeOwned, Serialize};
use type_reg::untagged::{BoxDt, TypeReg};
use crate::params::{KeyKnown, KeyMaybe, KeyUnknown, ParamsKeys, ParamsKeysImpl, ParamsTypeRegs};
/// Type registries to deserialize [`WorkspaceParamsFile`],
/// [`ProfileParamsFile`] and [`FlowP... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/rt_model_core/src/params/profile_params_opt.rs | crate/rt_model_core/src/params/profile_params_opt.rs | use std::{
hash::Hash,
marker::PhantomData,
ops::{Deref, DerefMut},
};
use serde::Serialize;
use type_reg::untagged::{BoxDt, TypeMapOpt};
/// Information that is shared across flows within a profile. `TypeMapOpt<K>`
/// newtype.
///
/// This is used to keep track of [`ProfileParams`] that need to be remov... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/rt_model_core/src/params/workspace_params_opt.rs | crate/rt_model_core/src/params/workspace_params_opt.rs | use std::{
hash::Hash,
marker::PhantomData,
ops::{Deref, DerefMut},
};
use serde::Serialize;
use type_reg::untagged::{BoxDt, TypeMapOpt};
/// Information that is shared across all profiles and flows in a workspace.
/// `TypeMapOpt<K>` newtype.
///
/// This is used to keep track of [`WorkspaceParams`] that... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/rt_model_core/src/params/params_type_regs.rs | crate/rt_model_core/src/params/params_type_regs.rs | use std::fmt::Debug;
use type_reg::untagged::{BoxDt, TypeReg};
use crate::params::{KeyMaybe, KeyUnknown, ParamsKeys, ParamsKeysImpl, ParamsTypeRegsBuilder};
/// Type registries to deserialize [`WorkspaceParamsFile`],
/// [`ProfileParamsFile`] and [`FlowParamsFile`].
///
/// [`WorkspaceParamsFile`]: peace_resource_rt... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/rt_model_core/src/params/flow_params_opt.rs | crate/rt_model_core/src/params/flow_params_opt.rs | use std::{
hash::Hash,
marker::PhantomData,
ops::{Deref, DerefMut},
};
use serde::Serialize;
use type_reg::untagged::{BoxDt, TypeMapOpt};
/// Information that is applicable to a flow. `TypeMapOpt<K>` newtype.
///
/// This is used to keep track of [`FlowParams`] that need to be removed when
/// building a ... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/rt_model_core/src/params/profile_params.rs | crate/rt_model_core/src/params/profile_params.rs | use std::{
hash::Hash,
marker::PhantomData,
ops::{Deref, DerefMut},
};
use serde::Serialize;
use type_reg::untagged::{BoxDt, TypeMap};
/// Information that is shared across flows within a profile. `TypeMap<K>`
/// newtype.
///
/// Shared information are the ones that will not change when using different
/... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/rt_model_core/src/error/apply_cmd_error.rs | crate/rt_model_core/src/error/apply_cmd_error.rs | use std::{fmt, fmt::Write};
use crate::{ItemsStateStoredStale, StateStoredAndDiscovered};
/// Error applying changes to items.
#[cfg_attr(feature = "error_reporting", derive(miette::Diagnostic))]
#[derive(Debug, thiserror::Error)]
pub enum ApplyCmdError {
/// Stored current states were not up to date with actual ... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/rt_model_core/src/error/params_specs_deserialize_error.rs | crate/rt_model_core/src/error/params_specs_deserialize_error.rs | use peace_flow_model::FlowId;
use peace_profile_model::Profile;
#[derive(Debug, thiserror::Error)]
#[error("Failed to deserialize params specs for `{profile}/{flow_id}`.")]
#[cfg_attr(
feature = "error_reporting",
derive(miette::Diagnostic),
diagnostic(
code(peace_rt_model::params_specs_deserialize... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/rt_model_core/src/error/state_downcast_error.rs | crate/rt_model_core/src/error/state_downcast_error.rs | use type_reg::untagged::{BoxDtDisplay, DataType};
/// Error downcasting a `BoxDtDisplay` into an item's concrete state type.
#[cfg_attr(feature = "error_reporting", derive(miette::Diagnostic))]
#[derive(Debug, thiserror::Error)]
pub enum StateDowncastError {
/// Both item states could not be downcasted.
#[erro... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/rt_model_core/src/error/states_deserialize_error.rs | crate/rt_model_core/src/error/states_deserialize_error.rs | use peace_flow_model::FlowId;
#[derive(Debug, thiserror::Error)]
#[cfg_attr(
feature = "error_reporting",
derive(miette::Diagnostic),
diagnostic(
code(peace_rt_model::states_deserialize),
help(
"Make sure that all commands using the `{flow_id}` flow, also use the same item graph... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/rt_model_core/src/error/web_error.rs | crate/rt_model_core/src/error/web_error.rs | use std::path::PathBuf;
/// Peace web support errors.
#[cfg_attr(feature = "error_reporting", derive(miette::Diagnostic))]
#[derive(Debug, thiserror::Error)]
pub enum WebError {
// web_sys related errors
/// Browser local storage unavailable.
#[error("Browser local storage unavailable.")]
#[cfg_attr(
... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/rt_model_core/src/error/native_error.rs | crate/rt_model_core/src/error/native_error.rs | use std::{ffi::OsString, path::PathBuf, sync::Mutex};
use peace_profile_model::ProfileInvalidFmt;
use peace_resource_rt::paths::WorkspaceDir;
/// Peace runtime errors.
#[cfg_attr(feature = "error_reporting", derive(miette::Diagnostic))]
#[derive(Debug, thiserror::Error)]
pub enum NativeError {
/// Failed to prese... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/rt_model_core/src/output/output_write.rs | crate/rt_model_core/src/output/output_write.rs | use std::fmt::Debug;
use async_trait::async_trait;
use peace_fmt::Presentable;
cfg_if::cfg_if! {
if #[cfg(feature = "output_progress")] {
use peace_progress_model::{
CmdBlockItemInteractionType,
ProgressTracker,
ProgressUpdateAndId,
};
use crate::CmdPro... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/data_derive/src/lib.rs | crate/data_derive/src/lib.rs | #![cfg_attr(coverage_nightly, feature(coverage_attribute))]
#![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 proc_macro2::Literal;
use syn::{
punctuated::Punctuated, token::Comma, Attribu... | rust | Apache-2.0 | 5e2c43f2c0b18672749d0902d2285c703e24de97 | 2026-01-04T20:22:52.922300Z | false |
azriel91/peace | https://github.com/azriel91/peace/blob/5e2c43f2c0b18672749d0902d2285c703e24de97/crate/webi_rt/src/lib.rs | crate/webi_rt/src/lib.rs | //! Web interface runtime data types for the peace automation framework.
| 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.