acceptor 0.0.1

no_std bundle of thin acceptors built on the accepts core traits
Documentation
  • Coverage
  • 66.67%
    18 out of 27 items documented0 out of 0 items with examples
  • Size
  • Source code size: 75.07 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 12.59 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Mikou-2A

acceptor

Crates.io Docs.rs License: MIT OR Apache-2.0 CI

acceptor is a no_std bundle of thin acceptors built on the accepts core traits (Accepts, AsyncAccepts, DynAsyncAccepts). It has no standard library or external dependencies. The singular acceptor here means “a bundle of acceptors” without implying a specific count.

⚠️ Pre-release: version 0.0.1 is experimental. APIs and crate layout may change without backward compatibility guarantees.

Add the dependency

[dependencies]
accepts = { version = "0.0.2", default-features = false } # no_std
acceptor = { version = "0.0.1" }

Example: filter + map chain

use acceptor::{Filter, Map, StatefulCallback};

let sink = StatefulCallback::new((), |_state: &(), v: i32| {
    // terminal example without shared state
    core::hint::black_box(v);
});
let pipeline = Map::new(|v: i32| v * 2, Filter::new(|v: &i32| v % 2 == 0, sink));

pipeline.accept(3); // filtered out
pipeline.accept(4); // 8 is processed

Version map

acceptor accepts
0.0.1 0.0.2

More

See ARCHITECTURE.md for naming guidelines, layout, and design notes.

License

MIT OR Apache-2.0