Skip to main content

CmdCtx

Trait CmdCtx 

Source
pub trait CmdCtx {
    // Required methods
    fn now_timestamp(&self) -> f64;
    fn today_timestamp(&self) -> i64;
    fn next_id(&mut self) -> String;
    fn commit_changes(
        &mut self,
        changes: BTreeMap<String, WireObject>,
        ancestor_index: Option<i64>,
    ) -> Result<i64>;
    fn current_head_index(&self) -> i64;

    // Provided method
    fn today(&self) -> DateTime<Utc> { ... }
}

Required Methods§

Source

fn now_timestamp(&self) -> f64

Source

fn today_timestamp(&self) -> i64

Source

fn next_id(&mut self) -> String

Source

fn commit_changes( &mut self, changes: BTreeMap<String, WireObject>, ancestor_index: Option<i64>, ) -> Result<i64>

Source

fn current_head_index(&self) -> i64

Provided Methods§

Source

fn today(&self) -> DateTime<Utc>

Implementors§