Add documentation to many core editor types (#7919)

Hopefully this makes it a bit easier for new contributors to dive into
the codebase :)

Release Notes:

- Improved documentation for many core editor types

---------

Co-authored-by: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
vultix
2024-02-17 09:03:05 -07:00
committed by GitHub
co-authored by Nathan Sobo
parent f19378135a
commit 8aa5319210
15 changed files with 138 additions and 5 deletions
+6 -1
View File
@@ -4,16 +4,21 @@ use std::{
fmt, iter,
};
/// A unique identifier for each distributed node
pub type ReplicaId = u16;
/// A [Lamport sequence number](https://en.wikipedia.org/wiki/Lamport_timestamp),
pub type Seq = u32;
/// A [Lamport timestamp](https://en.wikipedia.org/wiki/Lamport_timestamp),
/// used to determine the ordering of events in the editor.
#[derive(Clone, Copy, Default, Eq, Hash, PartialEq)]
pub struct Lamport {
pub replica_id: ReplicaId,
pub value: Seq,
}
/// A vector clock
/// A [vector clock](https://en.wikipedia.org/wiki/Vector_clock)
#[derive(Clone, Default, Hash, Eq, PartialEq)]
pub struct Global(SmallVec<[u32; 8]>);