Struct Issue

Source
pub struct Issue { /* private fields */ }
Expand description

The representation of an issue in it’s DAG form. This means that this issue can be modified (i.e., operations added) and than re-commited to disk.

Trait Implementations§

Source§

impl Debug for Issue

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Issue

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Entity for Issue

Source§

const FORMAT_VERSION: usize = 4usize

The expected format version number, that can be used for data migration/upgrade.
Source§

const NAMESPACE: &str = "bugs"

The namespace in git references (bugs, prs, …).
Source§

const TYPENAME: &str = "Issue"

The name of the entity (issue, pull-request, …), for human consumption.
Source§

type HistoryStep = IssueHistoryStep

A step in the history of a Snapshot's Timeline.
Source§

type OperationData = IssueOperationData

The type of Operation this Entity uses.
Source§

type Timeline = IssueTimeline

The complete timeline of an Snapshot of this Entity.
Source§

fn operations(&self) -> &Operations<Self>
where Self: Sized,

Return the Operations that compose this Entity.
Source§

unsafe fn from_parts( operations: Operations<Self>, create_time: Time, edit_time: Time, current_head: ObjectId, ) -> Self

Construct this instance from the data stored on disk. Read more
Source§

fn create_time(&self) -> &Time
where Self: Sized,

Return the lamport::Time that was set, when this Entity was first created.
Source§

fn edit_time(&self) -> &Time
where Self: Sized,

Return the lamport::Time that was set, when this Entity was last edited.
Source§

fn current_head(&self) -> &oid
where Self: Sized,

Return the commit object id of the last commit that added operations to this Entity.
Source§

fn id(&self) -> EntityId<Self>
where Self: Sized,

Return this Entity’s EntityId.
Source§

fn snapshot(&self) -> Snapshot<Self>

Generate a snapshot of this Entity. This is a frozen collection of this Entity's Operations. Read more
Source§

impl EntityRead for Issue

Source§

type CustomReadError = Infallible

An error that can be used to add to the default Error in read. Read more
Source§

fn last_git_commit( replica: &Replica, id: EntityId<Self>, ) -> Result<ObjectId, Error>

Get the commit associated with the last entry of this Entity's Operations. Read more
A breadth-first search to get a topological order of the Operations DAG where we discover the parents commit and go back in time up to the chronological root Read more
Source§

fn read(replica: &Replica, id: EntityId<Self>) -> Result<Self, Error<Self>>
where Self: Sized,

Fetch this Entity from a git repository and decode it. Read more
Source§

impl Serialize for Issue

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Timeline<Issue> for IssueTimeline

Source§

fn new() -> Self

Construct a new, empty Timeline.
Source§

fn from_root_operation(op: &Operation<Issue>) -> Self

Construct an Timeline from a root operation.
Source§

fn add(&mut self, op: &Operation<Issue>)

Add an operation to this timeline.
Source§

fn history(&self) -> &[<Issue as Entity>::HistoryStep]

Return the complete history. Read more

Auto Trait Implementations§

§

impl Freeze for Issue

§

impl RefUnwindSafe for Issue

§

impl Send for Issue

§

impl Sync for Issue

§

impl Unpin for Issue

§

impl UnwindSafe for Issue

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,