paladin-ports 0.5.1

Port trait definitions (hexagonal architecture contracts) for the Paladin framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
#![allow(missing_docs)]
//! Content Port
//!
//! A port that defines how the application fetches content from external sources or
//! ingests content from the user. This could be an HTTP API, a database, a file system,
//! or any other source of content.

use paladin_core::platform::container::content::ContentItem;

pub trait ContentIngestionPort {
    fn fetch_content(&self, content: ContentItem) -> Result<ContentItem, String>;
    fn ingest_content(&self, content: ContentItem) -> Result<(), String>;
}