Skip to main content

syncweb_core/
editorial.rs

1//! Opt-in editorial workflow primitives for collections.
2//!
3//! Every type in this module is optional — collections that carry no
4//! editorial metadata behave identically to the pre-editorial system.
5//! Consumers opt into editorial flows by subscribing to named
6//! [`Channel`]s over gossip.
7//!
8//! ## Quick start
9//!
10//! ```rust,ignore
11//! use syncweb_core::editorial::{
12//!     Channel, ContentType, EditorialRole, EditorialState,
13//!     workflow::assert_transition,
14//! };
15//!
16//! let curated = Channel::new("curated", Some("Editor-approved content"));
17//! assert_eq!(curated.topic_seed(), "syncweb/editorial/curated/v1");
18//!
19//! assert!(assert_transition(
20//!     Some(EditorialState::Draft),
21//!     EditorialState::Proposed,
22//!     EditorialRole::Maintainer,
23//! ).is_ok());
24//! ```
25pub mod channel;
26pub mod content_type;
27pub mod role;
28pub mod state;
29pub mod workflow;
30
31pub use channel::Channel;
32pub use content_type::ContentType;
33pub use role::EditorialRole;
34pub use state::EditorialState;