fret_core/share.rs
1//! Portable share-sheet (export) contracts.
2//!
3//! Share/export is modeled as a best-effort platform capability. The runner maps share items to
4//! platform-native share APIs (Android intents, iOS activity view controllers, etc.).
5
6#[derive(Debug, Clone, PartialEq, Eq)]
7pub enum ShareItem {
8 Text(String),
9 Url(String),
10 Bytes {
11 name: String,
12 mime: Option<String>,
13 bytes: Vec<u8>,
14 },
15}
16
17#[derive(Debug, Clone, PartialEq, Eq)]
18pub enum ShareSheetOutcome {
19 Shared,
20 Canceled,
21 Unavailable,
22 Failed { message: String },
23}