pub struct Identity { /* private fields */ }Expand description
A user identity. This is a unique representation of an user.
Implementations§
Source§impl Identity
impl Identity
Sourcepub fn read_legacy(
replica: &Replica,
id: EntityId<Self>,
) -> Result<Vec<VersionEntry>, Error>
pub fn read_legacy( replica: &Replica, id: EntityId<Self>, ) -> Result<Vec<VersionEntry>, Error>
Fetch an Identity from it’s legacy encoding from
a git repository and decode it.
The legacy encoding is used by git-bug.
This is only useful, if you need fine grained access to the concrete
data. If you simply want to access an Identity, use
Identity::read instead.
§Errors
If the associated git operations fail.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Identity
impl<'de> Deserialize<'de> for Identity
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 Identity
impl Entity for Identity
Source§const FORMAT_VERSION: usize = 4usize
const FORMAT_VERSION: usize = 4usize
The expected format version number, that can be used for data
migration/upgrade.
Source§const TYPENAME: &str = "Identity"
const TYPENAME: &str = "Identity"
The name of the entity (issue, pull-request, …), for human
consumption.
Source§type HistoryStep = IdentityHistoryStep
type HistoryStep = IdentityHistoryStep
A step in the history of a
Snapshot's
Timeline.Source§type OperationData = IdentityOperationData
type OperationData = IdentityOperationData
The type of Operation this
Entity uses.Source§fn operations(&self) -> &Operations<Self>where
Self: Sized,
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,
) -> Selfwhere
Self: Sized,
unsafe fn from_parts(
operations: Operations<Self>,
create_time: Time,
edit_time: Time,
current_head: ObjectId,
) -> Selfwhere
Self: Sized,
Construct this instance from the data stored on disk. Read more
Source§fn create_time(&self) -> &Timewhere
Self: Sized,
fn create_time(&self) -> &Timewhere
Self: Sized,
Return the
lamport::Time that was set, when this Entity was
first created.Source§fn edit_time(&self) -> &Timewhere
Self: Sized,
fn edit_time(&self) -> &Timewhere
Self: Sized,
Return the
lamport::Time that was set, when this Entity was last
edited.Source§fn current_head(&self) -> &oidwhere
Self: Sized,
fn current_head(&self) -> &oidwhere
Self: Sized,
Return the commit object id of the last commit that added
operations to this
Entity.Source§impl EntityRead for Identity
impl EntityRead for Identity
Source§type CustomReadError = Error
type CustomReadError = Error
Source§fn read(replica: &Replica, id: EntityId<Self>) -> Result<Self, Error<Self>>where
Self: Sized,
fn read(replica: &Replica, id: EntityId<Self>) -> Result<Self, Error<Self>>where
Self: Sized,
Source§fn breadth_first_search(
repo: &Repository,
root_id: ObjectId,
) -> Result<Vec<Commit<'_>>, Error>
fn breadth_first_search( repo: &Repository, root_id: ObjectId, ) -> Result<Vec<Commit<'_>>, Error>
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
Auto Trait Implementations§
impl Freeze for Identity
impl RefUnwindSafe for Identity
impl Send for Identity
impl Sync for Identity
impl Unpin for Identity
impl UnwindSafe for Identity
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more