Expand description
Procedural macros for the workspace effect crate.
Doc links cannot use the id_effect::… prefix here: this crate defines an effect function, which
shadows the effect crate name in rustdoc link resolution.
Macros§
- caps
caps!(A, B, C)is the environment typeHCons<A, HCons<B, HCons<C, HNil>>>. A capability listed twice (compared by token) is one compile error at the repeat; the de-duplicated list is still emitted so no further errors cascade.- effect
- Do-notation over an async body, building an
id_effect::Effect. - effect_
local - Like
effect!, but builds anid_effect::LocalEffect, whose body may hold!Sendvalues.~exprbinds aLocalEffector aSendEffectover a part ofR. - match_
effect - Enum match helper — prefix variant patterns with
EnumPathfor exhaustiveness checking.
Attribute Macros§
- distributed_
behavior - Mark a process struct as a remotely spawnable behavior.
- 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, andHashfor Effect.ts-style data types. - Entity
- Derive
id_effect_sql::Entity(map a#[derive(FromRow)]struct to a table forRepository<T>;id_effect_sqlfeaturerepository). - FromRow
- Derive
id_effect_sql::FromRow(decode a struct with named fields from anSqlRow). - Fsm
- Derive
id_effect_fsm::Fsm(initial state + transition table) for a fieldless state enum. - Optics
- Derive field lenses and enum prisms for [
id_effect_optics]. - Provider
Spec - Derive an inherent
layer()(anid_effect::Layerproviding the service) from#[provides(Service)]. Re-exported byid_effectasProviderSpecDerive. - Schema
- Derive an inherent
schema()constructor and an [id_effect::schema::HasSchema] impl for a struct with named fields (JSON-shaped [id_effect::schema::Unknown] wire).