pub struct Project {
pub id: ProjectId,
pub space_id: SpaceId,
pub name: String,
pub description: Option<String>,
pub root_path: PathBuf,
pub language: Option<String>,
pub created_at: EpochMillis,
pub updated_at: EpochMillis,
pub meta: Option<Value>,
}Expand description
A single source-controlled directory tree within a space.
§Examples
use g8_core::{Project, ProjectId, SpaceId, EpochMillis};
use std::path::PathBuf;
let proj = Project {
id: ProjectId::derive(&["docs", "project"]),
space_id: SpaceId::derive(&["docs", "space"]),
name: "checkout-api".into(),
description: Some("News ranking service".into()),
root_path: PathBuf::from("/home/user/checkout-api"),
language: Some("rust".into()),
created_at: EpochMillis::from_i64(1_700_000_000_000),
updated_at: EpochMillis::from_i64(1_700_000_000_000),
meta: None,
};
assert_eq!(proj.name, "checkout-api");Fields§
§id: ProjectId§space_id: SpaceId§name: StringHuman-readable label; not globally unique (unique within a space).
description: Option<String>§root_path: PathBufAbsolute, canonicalized path to the project root.
language: Option<String>Detected primary language: "rust" | "ts" | "py" | "go" |
"mixed" | or an arbitrary unknown value.
created_at: EpochMillis§updated_at: EpochMillis§meta: Option<Value>Arbitrary extensibility bag — serde_json::Value for v0.1 flexibility.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Project
impl<'de> Deserialize<'de> for Project
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
Auto Trait Implementations§
impl Freeze for Project
impl RefUnwindSafe for Project
impl Send for Project
impl Sync for Project
impl Unpin for Project
impl UnsafeUnpin for Project
impl UnwindSafe for Project
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