Skip to main content

Crate id_effect

Crate id_effect 

Source
Expand description

Unified interpreter-style effects, piping, and build-time context wiring.

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::from_async;
pub use crate::kernel::into_bind;
pub use crate::kernel::pure;
pub use crate::kernel::scope_with;
pub use crate::kernel::scoped;
pub use crate::kernel::succeed;
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 concurrency::CancellationToken;
pub use concurrency::FiberHandle;
pub use concurrency::FiberId;
pub use concurrency::FiberRef;
pub use concurrency::FiberStatus;
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::with_fiber_id;
pub use context::Cons;
pub use context::Context;
pub use context::Get;
pub use context::GetMut;
pub use context::HasTag;
pub use context::Here;
pub use context::Matcher;
pub use context::Nil;
pub use context::Skip0;
pub use context::Skip1;
pub use context::Skip2;
pub use context::Skip3;
pub use context::Skip4;
pub use context::Tag;
pub use context::Tagged;
pub use context::There;
pub use context::ThereHere;
pub use context::prepend_cell;
pub use context::tagged;
pub use coordination::semaphore::Permit;
pub use coordination::Channel;
pub use coordination::ChannelReadError;
pub use coordination::Deferred;
pub use coordination::Latch;
pub use coordination::PubSub;
pub use coordination::Queue;
pub use coordination::QueueChannel;
pub use coordination::QueueError;
pub use coordination::Ref;
pub use coordination::Semaphore;
pub use coordination::SynchronizedRef;
pub use failure::Cause;
pub use failure::Exit;
pub use failure::Or;
pub use foundation::either::Either;
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 layer::Layer;
pub use layer::LayerDiagnostic;
pub use layer::LayerEffect;
pub use layer::LayerExt;
pub use layer::LayerFn;
pub use layer::LayerFnFrom;
pub use layer::LayerFrom;
pub use layer::LayerGraph;
pub use layer::LayerNode;
pub use layer::LayerPlan;
pub use layer::LayerPlannerError;
pub use layer::Service;
pub use layer::ServiceEnv;
pub use layer::Stack;
pub use layer::StackThen;
pub use layer::layer_service;
pub use layer::layer_service_env;
pub use layer::merge_all;
pub use layer::provide_service;
pub use layer::service;
pub use layer::service;
pub use layer::service_env;
pub use observability::AnnotateCurrentSpanErr;
pub use observability::AnnotateCurrentSpanSuccess;
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_effect_event;
pub use observability::emit_fiber_event;
pub use observability::install_tracing_layer;
pub use observability::metric_make;
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::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::backpressure_decision;
pub use streaming::end_stream;
pub use streaming::send_chunk;
pub use streaming::stream_from_channel;
pub use streaming::stream_from_channel_with_policy;
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 context::match_;
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 im;

Modules§

algebra
Stratum 1: Algebraic Structures — abstract patterns that recur throughout the system.
collections
Stratum 14 — Collections
concurrency
Stratum 7 — Concurrency Primitives
context
Stratum 3 — Environment & context (Tag, Tagged, Cons / Nil, paths, Get / GetMut, Context).
coordination
Stratum 9 — Coordination & Communication
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.
layer
Stratum 5 — Layers & Dependency Injection
macros
Declarative macros (pipe!, ctx!, …).
observability
Stratum 15 — Observability
pipe
pipe! — left-to-right application (see Pipe).
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.
ctx
Runtime context builder with service cells.
effect
Procedural do-notation macro for [id_effect::Effect].
err
Type-level error sum (“union”) using nested Or.
layer_graph
Build a LayerGraph from a compact declaration block.
layer_node
Build a single LayerNode.
pipe
Apply functions left-to-right: pipe!(x, f, g) expands to g(f(x)).
req
Type-level required service stack (Rust equivalent of R union requirements).
service_def
Define a service key and ergonomic service type alias in one declaration.
service_key
Declare a zero-sized service key type (Effect.ts tag identity).

Structs§

Duration
A Duration type to represent a span of time, typically used for system timeouts.

Enums§

Ordering
An Ordering is the result of a comparison between two values.

Attribute Macros§

effect_tagged
Injects pub _tag: &'static str, an [id_effect::match_::HasTag] impl, and EFFECT_TAGGED_TAG on the struct (see generated inherent associated const).

Derive Macros§

EffectData
Derive macro: structural [PartialEq], [Eq], and [Hash] for Effect.ts-style data types.