Expand description
Unified interpreter-style effects, piping, and capability-first dependency injection.
kernel— unifiedEffect<A, E, R>plusinto_bind.effect!— procedural do-notation (x ~ exprbind,~ exprdiscard), tailOk(expr); seemacros.macros— declarative macros (pipe!,require!, …).capability— trait-first DI:Env,ProviderSpec,CapabilityGraph,run_with.- [
mod@piping] —Pipetrait (macro:pipe!). schedule— Effect.ts-style repeat/retry policies.stream— Effect.ts-inspired stream combinators.
Re-exports§
pub use crate::kernel::BoxFuture;pub use crate::kernel::Effect;pub use crate::kernel::IntoBind;pub use crate::kernel::acquire_release;pub use crate::kernel::box_future;pub use crate::kernel::fail;pub use crate::kernel::flatten_or;pub use crate::kernel::from_async;pub use crate::kernel::into_bind;pub use crate::kernel::join_binds2;pub use crate::kernel::join_binds3;pub use crate::kernel::join_binds4;pub use crate::kernel::pure;pub use crate::kernel::scope_with;pub use crate::kernel::scoped;pub use crate::kernel::succeed;pub use crate::match_::HasTag;pub use crate::match_::Matcher;pub use capability::Cap;pub use capability::CapBind;pub use capability::CapBindR;pub use capability::CapBindWide;pub use capability::CapKeys;pub use capability::CapList;pub use capability::CapWiden;pub use capability::Capability;pub use capability::CapabilityDiagnostic;pub use capability::CapabilityError;pub use capability::CapabilityGraph;pub use capability::CapabilityId;pub use capability::CapabilityKey;pub use capability::CapabilityPlannerError;pub use capability::CapabilitySet;pub use capability::Caps;pub use capability::Env;pub use capability::FromEnv;pub use capability::HasCap;pub use capability::Needs;pub use capability::NoCaps;pub use capability::PlannerNode;pub use capability::PlannerPlan;pub use capability::Provider;pub use capability::ProviderBox;pub use capability::ProviderError;pub use capability::ProviderNode;pub use capability::ProviderSpec;pub use capability::RunError;pub use capability::build_env;pub use capability::cap_into_bind;pub use capability::plan_topological;pub use capability::run;pub use capability::run_with;pub use capability::with_fiber_and_override;pub use capability::with_override;pub use collections::ChunkBuilder;pub use collections::EffectHashMap;pub use collections::EffectHashSet;pub use collections::EffectSortedMap;pub use collections::EffectSortedSet;pub use collections::EffectVector;pub use collections::MutableHashMap;pub use collections::MutableHashSet;pub use collections::MutableList;pub use collections::MutableQueue;pub use collections::RedBlackTree;pub use collections::Trie;pub use compute::AdaptiveContext;pub use compute::AdmissionController;pub use compute::ClusterResourcePolicy;pub use compute::ComputeFabric;pub use compute::ComputeSupervisor;pub use compute::CpuSpreadBucket;pub use compute::FabricJobSpec;pub use compute::FiberPool;pub use compute::MetricMode;pub use compute::MetricPolicy;pub use compute::MockTelemetry;pub use compute::PlacementMode;pub use compute::RebalanceStrategy;pub use compute::ResourcePolicy;pub use compute::SysinfoTelemetry;pub use compute::TelemetryEngine;pub use compute::TelemetrySnapshot;pub use compute::WorkProfile;pub use compute::configure_rayon_threads;pub use compute::ensure_run_context;pub use compute::install_fabric;pub use compute::install_parallel;pub use compute::refresh_adaptive_context;pub use concurrency::CancellationToken;pub use concurrency::FiberHandle;pub use concurrency::FiberId;pub use concurrency::FiberRef;pub use concurrency::FiberStatus;pub use concurrency::Supervisor;pub use concurrency::SupervisorPolicy;pub use concurrency::check_interrupt;pub use concurrency::fiber_all;pub use concurrency::fiber_never;pub use concurrency::fiber_succeed;pub use concurrency::interrupt_all;pub use concurrency::supervised;pub use concurrency::with_fiber_id;pub use coordination::semaphore::Permit;pub use coordination::Channel;pub use coordination::ChannelReadError;pub use coordination::Deferred;pub use coordination::FnRequestResolver;pub use coordination::Latch;pub use coordination::MissingKey;pub use coordination::PubSub;pub use coordination::Queue;pub use coordination::QueueChannel;pub use coordination::QueueError;pub use coordination::Ref;pub use coordination::RequestEntry;pub use coordination::RequestResolver;pub use coordination::Semaphore;pub use coordination::SubscriptionRef;pub use coordination::SynchronizedRef;pub use coordination::batching;pub use coordination::make_request_resolver;pub use failure::Cause;pub use failure::Exit;pub use failure::Or;pub use foundation::func::always;pub use foundation::func::compose;pub use foundation::func::const_;pub use foundation::func::flip;pub use foundation::func::identity;pub use foundation::func::memoize;pub use foundation::func::pipe1;pub use foundation::func::pipe2;pub use foundation::func::pipe3;pub use foundation::func::tupled;pub use foundation::func::untupled;pub use foundation::mutable_ref::MutableRef;pub use foundation::piping::Pipe;pub use foundation::predicate::Predicate;pub use observability::AnnotateCurrentSpanErr;pub use observability::AnnotateCurrentSpanSuccess;pub use observability::ComputeEvent;pub use observability::EffectEvent;pub use observability::FiberEvent;pub use observability::LogSpan;pub use observability::Metric;pub use observability::SpanRecord;pub use observability::TracingConfig;pub use observability::TracingFiberRefs;pub use observability::TracingSnapshot;pub use observability::annotate_current_span;pub use observability::emit_compute_event;pub use observability::emit_effect_event;pub use observability::emit_fiber_event;pub use observability::install_tracing_layer;pub use observability::metric_make;pub use observability::record_compute_event;pub use observability::snapshot_tracing;pub use observability::with_span;pub use resource::Cache;pub use resource::CacheStats;pub use resource::Finalizer;pub use resource::KeyedPool;pub use resource::Pool;pub use resource::Scope;pub use runtime::Never;pub use runtime::Runtime;pub use runtime::ThreadSleepRuntime;pub use runtime::run_async;pub use runtime::run_blocking;pub use runtime::run_fork;pub use runtime::yield_now;pub use scheduling::AnyDateTime;pub use scheduling::Clock;pub use scheduling::DurationParseError;pub use scheduling::LiveClock;pub use scheduling::Schedule;pub use scheduling::ScheduleDecision;pub use scheduling::ScheduleInput;pub use scheduling::TestClock;pub use scheduling::TimeUnit;pub use scheduling::UtcDateTime;pub use scheduling::ZonedDateTime;pub use scheduling::forever;pub use scheduling::repeat;pub use scheduling::repeat_n;pub use scheduling::repeat_with_clock;pub use scheduling::repeat_with_clock_and_interrupt;pub use scheduling::retry;pub use scheduling::retry_with_clock;pub use scheduling::retry_with_clock_and_interrupt;pub use scheduling::timezone;pub use schema::brand::Brand;pub use schema::data::DataError;pub use schema::data::DataStruct;pub use schema::data::DataTuple;pub use schema::data::EffectData as EffectDataTrait;pub use schema::equal::EffectHash;pub use schema::equal::Equal;pub use schema::order::DynOrder;pub use schema::order::ordering;pub use schema::HasSchema;pub use schema::ParseError;pub use schema::ParseErrors;pub use schema::Redacted;pub use schema::Schema;pub use schema::Unknown;pub use stm::Outcome;pub use stm::Stm;pub use stm::TMap;pub use stm::TQueue;pub use stm::TRef;pub use stm::TSemaphore;pub use stm::Txn;pub use stm::atomically;pub use stm::commit;pub use streaming::stream::StreamBroadcastFanout;pub use streaming::stream::StreamChannelFull;pub use streaming::stream::StreamSender;pub use streaming::stream::StreamV1;pub use streaming::BackpressureDecision;pub use streaming::BackpressurePolicy;pub use streaming::Chunk;pub use streaming::Sink;pub use streaming::Stream;pub use streaming::Transducer;pub use streaming::backpressure_decision;pub use streaming::broadcast_with_replay;pub use streaming::combine_latest;pub use streaming::end_stream;pub use streaming::keyed_join;pub use streaming::send_chunk;pub use streaming::state_scan;pub use streaming::state_scan;pub use streaming::stream_from_channel;pub use streaming::stream_from_channel_with_policy;pub use streaming::transducer_filter;pub use streaming::transducer_map;pub use testing::assert_no_leaked_fibers;pub use testing::assert_no_unclosed_scopes;pub use testing::record_leaked_fiber;pub use testing::record_unclosed_scope;pub use testing::run_test;pub use testing::run_test_with_clock;pub use coordination::channel;pub use coordination::ref_;pub use foundation::either;pub use foundation::either;pub use foundation::func;pub use scheduling::clock;pub use scheduling::duration;pub use scheduling::schedule;pub use schema::data;pub use streaming::stream;pub use testing::snapshot;pub use algebra::Alternative;pub use algebra::Foldable;pub use algebra::Invariant;pub use algebra::sequence_vec;pub use algebra::traverse_option;pub use algebra::traverse_vec;pub use im;
Modules§
- algebra
- Stratum 1: Algebraic Structures — abstract patterns that recur throughout the system.
- capability
- Capability-first dependency injection (v2).
- collections
- Stratum 14 — Collections
- compute
- Compute Fabric
- concurrency
- Stratum 7 — Concurrency Primitives
- coordination
- Stratum 9 — Coordination & Communication
- err
err!macro.- failure
- Stratum 4 — Failure Algebra
- foundation
- Stratum 0: Foundations — the categorical bedrock upon which all effect abstractions rest.
- kernel
- Stratum 2 — Core Effect:
Effect,Thunk,Result,Reader. - macros
- Declarative macros (
pipe!,provide!, …). - match_
- Runtime value matcher — mirrors Effect.ts-style
Match/ pattern routing. - observability
- Stratum 15 — Observability
- parallelism
- Execution policy for bulk data-parallel operations (Rayon).
- pipe
pipe!— left-to-right application (seePipe).- resource
- Stratum 8 — Resource Management
- runtime
- Stratum 6 — Execution & Runtime
- scheduling
- Stratum 10 — Scheduling & Time
- schema
- Stratum 13 — Data & Schema
- stm
- Stratum 12 — Transactional Memory
- streaming
- Stratum 11 — Streaming
- testing
- Stratum 16 — Testing
Macros§
- brand
- Define a named branded newtype with standard derives.
- caps
- Required capability set for
Effect<_, _, caps!(…)>(runtime:CapList). - effect
- Procedural do-notation macro for [
id_effect::Effect]. - err
- Type-level error sum (“union”) using nested
Or. - law_
test - Generate monad law checks for a type constructor.
- match_
effect - Enum match helper — prefix variant patterns with
EnumPathfor exhaustiveness checking. - mock_
capability - Generate a
ProviderSpecwith a closure body. - pipe
- Apply functions left-to-right:
pipe!(x, f, g)expands tog(f(x)). - provide
- Wrap a
ProviderSpecas aProviderBox. - providers
- Expand a named provider bundle to a
[ProviderBox]array. - require
- Borrow a capability from the effect environment parameter.
Structs§
- Duration
- A
Durationtype to represent a span of time, typically used for system timeouts.
Enums§
- Ordering
- An
Orderingis the result of a comparison between two values.
Type Aliases§
- Either
Either<R, L>—Ok(R)is Right (success),Err(L)is Left (failure/alternative).
Attribute Macros§
- capability
- Generates a capability key struct and [
id_effect::CapabilityKey] impl for a trait or struct. - effect_
tagged - Injects
pub _tag: &'static str, an [id_effect::match_::HasTag] impl, andEFFECT_TAGGED_TAGon the struct (see generated inherent associated const).
Derive Macros§
- Effect
Data - Derive macro: structural [
PartialEq], [Eq], and [Hash] for Effect.ts-style data types. - Fsm
- Stub derive for future FSM transition tables (
id_effect_fsm). - Optics
- Derive field lenses and enum prisms for [
id_effect_optics]. - Provider
Spec Derive - Derive [
id_effect::ProviderSpec] when paired with#[provides(Capability)]. - Schema
Parser - Stub derive for future schema-driven parser codegen (
id_effect_parse).