1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
// This is free and unencumbered software released into the public domain.
//! Execution traits and configuration values for ASIMOV program patterns.
//!
//! A *pattern* describes a program's role and logical input/output contract:
//! for example, a [`Reader`] imports a document into RDF, an [`Adapter`] queries
//! a dataset with SPARQL, and a [`Writer`] exports RDF to another representation.
//! The [Program Patterns Specification][pps] defines their command-line
//! interfaces and the requirements for hosts that invoke them.
//!
//! This crate provides two building blocks:
//!
//! - [`Execute<T>`] is the asynchronous operation shared by all pattern traits,
//! with an implementation-specific associated [`Error`](Execute::Error) type.
//! - [`programs`] contains role-specific marker traits and owned option values
//! such as [`ReaderOptions`], with builders for configuring invocations.
//! Optional native support is described separately by capability metadata such
//! as [`ListerCapabilities`], using [`OptionSupport`] to distinguish unknown
//! support from an explicit declaration. Callers supply this metadata; this
//! crate does not discover capabilities or read module manifests.
//!
//! Executable lookup, process management, stream transport, and result decoding
//! belong to implementations. The companion [`asimov-runner`][runner] crate
//! supplies Tokio-backed process wrappers and re-exports these option types.
//! [`asimov-remote`][remote] supplies HTTP-backed fetch/list operations using the
//! same traits. Shared raw JSONL payloads live in [`asimov-flow`][flow]; each
//! executor chooses its own error type. These role traits are the execution
//! boundary for reusable components, while explicit typed port schemas and
//! generalized graph scheduling are still evolving.
//! Consult its documentation for supported output modes and current limitations;
//! implementing a marker trait does not by itself establish PPS conformance.
//!
//! # Configuring an operation
//!
//! ```
//! use asimov_patterns::ListerOptions;
//!
//! let options = ListerOptions::builder()
//! .limit(25)
//! .output("jsonl")
//! .build();
//!
//! assert_eq!(options.limit, Some(25));
//! assert_eq!(options.output.as_deref(), Some("jsonl"));
//! assert!(options.other.is_empty());
//! ```
//!
//! Building options neither executes a program nor validates its capabilities.
//! Unset fields remain `None`: `asimov-runner` omits the corresponding flags and
//! lets the program apply its specified defaults. In particular, `input` and
//! `output` fields name **formats**, not files or stream endpoints.
//!
//! # Payloads and representations
//!
//! Pattern traits describe semantics without fixing a Rust representation for
//! the result. Their type parameter `T` can represent serialized bytes, parsed
//! data, a fallible stream, or another documented result representation; it is
//! not the number of RDF statements or logical results. [`Indexer`] fixes its result to `()`
//! because indexing has no payload output.
//! A streaming implementation can return successful startup before execution
//! finishes; its result must expose subsequent failures. See [`programs`] for
//! links to concrete transport, completion, and result semantics.
//!
//! The options do not parse, validate, or transcode RDF. The spec's default
//! `jsonl` token requires a shared [RDF mapping profile][rdf-mapping]; it does
//! not imply JSON-LD or a particular JSON object shape. Composing two graph
//! patterns requires agreement on both serialization and profile.
//!
//! # Features
//!
//! The crate declares `no_std` and uses `alloc` for strings, collections, and
//! boxed futures. None of its public APIs is gated on the `std` feature.
//! The default features are `all` and `std`; `std` enables standard-library
//! support in dependencies. `all`, `tracing`, and `unstable` currently enable no
//! additional behavior in this crate. Disabling `std` here does not guarantee
//! that the dependency graph is usable on a target without a standard library.
//! Currently, a standalone `--no-default-features` build fails in the transitive
//! `dogma` dependency because collection traits are enabled without its `alloc`
//! feature; the ungated API should not be read as a working no-std build guarantee.
//!
//! [pps]: https://asimov-specs.github.io/program-patterns/
//! [runner]: https://docs.rs/asimov-runner
//! [remote]: https://docs.rs/asimov-remote
//! [flow]: https://docs.rs/asimov-flow
//! [rdf-mapping]: https://asimov-specs.github.io/program-patterns/#rdf-mapping
extern crate alloc;
extern crate std;
pub use *;
pub use *;
pub use *;