accepts
⚠️ Pre-release: version 0.0.2 is experimental. APIs and crate layout may change without backward compatibility guarantees.
accepts is the minimal core for composing synchronous and asynchronous
"acceptor" pipelines. It exposes only the traits and blanket implementations you
need to wire values through a chain of acceptors. There are no bundled acceptors;
those live in sibling crates.
For design details, see ARCHITECTURE.md in this repo.
Naming
This crate only defines the core traits. See ARCHITECTURE.md for series lineup and naming guidelines.
Quickstart
Add the dependency
[]
= "0.0.2"
- Default features include
alloc. Disable defaults for a core-onlyno_stdbuild:accepts = { version = "0.0.2", default-features = false }. Re-enableallocif you still wantBox/Arcand dyn-async support.
Implement and fan out
use Accepts;
;
;
// Tuples and collections forward to each element; `&str` is `Copy`, so cloning
// to fan out is cheap.
let pipeline = ;
pipeline.accept;
Async pipelines follow the same shape with AsyncAccepts; enable alloc if you
want to box the returned futures via DynAsyncAccepts.
Version map
| accepts | notes |
|---|---|
| 0.0.2 | current pre-release |
More
See ARCHITECTURE.md for design notes, feature flags, and blanket impl coverage.
Feature flags
| Feature | Default | Description |
|---|---|---|
alloc |
✅ | Adds heap-backed blanket impls (Box/Rc/Arc), Vec/VecDeque impls, and auto-implements DynAsyncAccepts. |
Crate layout
Accepts,AsyncAccepts,DynAsyncAcceptsat the crate root.implementations/core/*forno_stdblanket impls (tuples,Option,Result, slices/arrays, pointer types).implementations/alloc/*for heap-backed impls (Vec,VecDeque, pointers).
License
This project is dual-licensed under MIT and Apache-2.0. You may use it under either license.
Contributing
Bug reports, feature requests, and pull requests are always welcome.
I'm still new to GitHub and not very confident in English. For now, I'm doing my best with the help of ChatGPT, so I might misunderstand something. Thanks for your understanding!