Trait CobAction

Source
pub trait CobAction {
    // Provided methods
    fn parents(&self) -> Vec<Oid> { ... }
    fn produces_identifier(&self) -> bool { ... }
}

Provided Methods§

Source

fn parents(&self) -> Vec<Oid>

Parent objects this action depends on. For example, patch revisions have the commit objects as their parent.

Source

fn produces_identifier(&self) -> bool

The outcome of some actions are to be referred later. For example, one action may create a comment, followed by another action that may create a reply to the comment, referring to it. Since actions are stored as part of crate::cob::op::Op, and operations are the smallest identifiable units, this may lead to ambiguity. It would not be possible to to, say, address one particular comment out of two, if the corresponding actions of creations were part of the same operation. To help avoid this, implementations signal whether specific actions require “their own” identifier. This allows checking for multiple such actions before creating an operation.

Implementors§

Source§

impl CobAction for radicle_node::identity::Action

Source§

impl CobAction for radicle::cob::issue::Action

Source§

impl CobAction for radicle::cob::patch::Action

Source§

impl CobAction for radicle::cob::thread::Action

Source§

impl CobAction for radicle::cob::external::Action