Trait sit_core::issue::Issue
[−]
[src]
pub trait Issue: Sized { type Error: Error + Debug; type Record: Record; type Records: IntoIterator<Item = Self::Record>; type RecordIter: Iterator<Item = Self::Records>; fn id(&self) -> &str; fn record_iter(&self) -> Result<Self::RecordIter, Self::Error>; fn new_record<S: AsRef<str>, R: Read, I: Iterator<Item = (S, R)>>(
&self,
iter: I,
link_parents: bool
) -> Result<Self::Record, Self::Error>; }
Issue is a topic or a problem for debate, discussion and resolution. Also known as a "ticket".
Because of SIT's extensible nature, issue can be also be used to represent a wild variety of entities. For example, a Kanban board with its records representing movement of other issues into, across and out of the board.
Associated Types
type Error: Error + Debug
Error type used by the implementation
type Record: Record
Record type used by the implementation
type Records: IntoIterator<Item = Self::Record>
Type used to list records that can be referenced as a slice of records
type RecordIter: Iterator<Item = Self::Records>
Iterator over lists of records
Required Methods
fn id(&self) -> &str
Issue must have an ID, ideally human-readable
fn record_iter(&self) -> Result<Self::RecordIter, Self::Error>
Iterates through the tree of records
fn new_record<S: AsRef<str>, R: Read, I: Iterator<Item = (S, R)>>(
&self,
iter: I,
link_parents: bool
) -> Result<Self::Record, Self::Error>
&self,
iter: I,
link_parents: bool
) -> Result<Self::Record, Self::Error>
Creates and returns a new record.
Will reference all dangling records as its parent, unless
link_parents
is set to false
Implementors
impl<'a> IssueTrait for Issue<'a> type Error = Error; type Record = Record<'a>; type Records = Vec<Record<'a>>; type RecordIter = IssueRecordIter<'a>;