pub struct ProjectId(/* private fields */);Expand description
A stable project identity ([projects.<project-id>] in tix.toml).
Never blank, never containing whitespace or a TOML-structural character, and
never reused. It is the registry key and every issue association points at
it, so a rename changes the display label only and leaves every association and
derived figure intact (C-002, SC-005). The type exists so “this string is an
id” is checked once, at the boundary, instead of at every lookup — the same
problem crate::views::registry::ViewId solves for views. The rules
themselves are shared with EpicId through StableId.
Implementations§
Source§impl ProjectId
impl ProjectId
Sourcepub const MAX_LEN: usize = <Self as StableId>::MAX_LEN
pub const MAX_LEN: usize = <Self as StableId>::MAX_LEN
The longest id the registry accepts (see StableId::MAX_LEN).
Sourcepub fn new(raw: &str) -> Result<Self>
pub fn new(raw: &str) -> Result<Self>
Validate an explicit id; see StableId::new.
Sourcepub fn generate() -> Self
pub fn generate() -> Self
Allocate a new id, p--prefixed; see StableId::generate for the
never-reused guarantee.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ProjectId
impl<'de> Deserialize<'de> for ProjectId
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>,
impl Eq for ProjectId
Source§impl Ord for ProjectId
impl Ord for ProjectId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for ProjectId
impl PartialOrd for ProjectId
Source§impl StableId for ProjectId
impl StableId for ProjectId
Source§const PREFIX: &'static str = "p-"
const PREFIX: &'static str = "p-"
p- for projects, e- for epics, i- for initiatives,
cs- for cycle schedules.Source§fn from_validated(raw: String) -> Self
fn from_validated(raw: String) -> Self
StableId::new.Source§const MAX_LEN: usize = 128
const MAX_LEN: usize = 128
Source§fn generate() -> Self
fn generate() -> Self
Self::PREFIX-prefixed. Read moreimpl StructuralPartialEq for ProjectId
Auto Trait Implementations§
impl Freeze for ProjectId
impl RefUnwindSafe for ProjectId
impl Send for ProjectId
impl Sync for ProjectId
impl Unpin for ProjectId
impl UnsafeUnpin for ProjectId
impl UnwindSafe for ProjectId
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<I> IntoResettable<String> for I
impl<I> IntoResettable<String> for I
Source§fn into_resettable(self) -> Resettable<String>
fn into_resettable(self) -> Resettable<String>
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more