返回 CodeWhale
composer.rs
根目录 / crates / command-contract / src / facets / composer.rs
1 pub struct QueuedDrafts {
2 pub editing: Option<String>,
3 pub waiting: Vec<String>,
4 }
5
6 pub struct ParkedDraft {
7 pub timestamp: String,
8 pub text: String,
9 }
10
11 pub trait CommandComposerContext {
12 fn queue_previews(&self) -> QueuedDrafts;
13 fn editing_queue(&self) -> bool;
14 fn edit_queued(&mut self, index: usize, status: String) -> bool;
15 fn drop_queued(&mut self, index: usize) -> bool;
16 fn clear_queued(&mut self) -> bool;
17 fn parked_drafts(&self) -> Vec<ParkedDraft>;
18 fn restore_parked(&mut self) -> Option<(String, usize)>;
19 fn clear_parked(&mut self) -> Result<usize, String>;
20 }
21
21 lines RUST