pub trait CobAction {
// Provided methods
fn parents(&self) -> Vec<Oid> { ... }
fn produces_identifier(&self) -> bool { ... }
}
Provided Methods§
Sourcefn parents(&self) -> Vec<Oid>
fn parents(&self) -> Vec<Oid>
Parent objects this action depends on. For example, patch revisions have the commit objects as their parent.
Sourcefn produces_identifier(&self) -> bool
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.