project
The
projects table: each repository or directory root that gest tracks.struct Model
pub struct ModelA project represents a tracked repository or directory root.
Each project is uniquely identified by its root path and
is assigned a stable Id at creation time.
| Field | Type | Description |
|---|---|---|
archived_at |
Option<DateTime<Utc>> | When the project was soft-archived, or None if it is active. |
created_at |
DateTime<Utc> | When the project was first registered. |
id |
Id | Stable identifier shared with collaborators via synced .gest/project.yaml. |
root |
PathBuf | Absolute path to the local checkout root. |
updated_at |
DateTime<Utc> | When the project record was last modified. |
Implements Clone, Debug, Deserialize<'de>, Eq, PartialEq, Serialize, TryFrom<Row>.
Model::archived_at
pub fn archived_at(&self) -> &Option<DateTime<Utc>>When the project was soft-archived, or None if it is active.
| Parameter | Type | Description |
|---|---|---|
| returns | &Option<DateTime<Utc>> |
Model::created_at
pub fn created_at(&self) -> &DateTime<Utc>When the project was first registered.
| Parameter | Type | Description |
|---|---|---|
| returns | &DateTime<Utc> |
Model::id
pub fn id(&self) -> &IdStable identifier shared with collaborators via synced .gest/project.yaml.
| Parameter | Type | Description |
|---|---|---|
| returns | &Id |
Model::root
pub fn root(&self) -> &PathBufAbsolute path to the local checkout root.
| Parameter | Type | Description |
|---|---|---|
| returns | &PathBuf |
Model::updated_at
pub fn updated_at(&self) -> &DateTime<Utc>When the project record was last modified.
| Parameter | Type | Description |
|---|---|---|
| returns | &DateTime<Utc> |
Model::from_synced_parts
pub fn from_synced_parts(
id: Id,
root: PathBuf,
archived_at: Option<DateTime<Utc>>,
created_at: DateTime<Utc>,
updated_at: DateTime<Utc>,
) -> SelfReconstruct a project from a synced .gest/project.yaml file.
The id and timestamps come from the synced file (so collaborators share
a stable identity), while root is the local checkout path.
| Parameter | Type | Description |
|---|---|---|
id |
Id | the id from the synced file |
root |
PathBuf | the local checkout path |
archived_at |
Option<DateTime<Utc>> | when the project was archived, or None if it is active |
created_at |
DateTime<Utc> | when the project was first registered |
updated_at |
DateTime<Utc> | when the project record last changed |
| returns | Self | The project, built from these parts with no checks. |
Model::new
pub fn new(root: PathBuf) -> SelfCreate a new project with a fresh Id and timestamps set to now.
| Parameter | Type | Description |
|---|---|---|
root |
PathBuf | the path of the project root |
| returns | Self | The project, active (not archived) and not yet saved. |