pub struct ProjectId(/* private fields */);
Expand description
How projects are referenced. Unlike tasks, projects don’t have to have parents.
Implementations§
Methods from Deref<Target = Id>§
Sourcepub fn join<S>(&self, next: S) -> Result<Id, InvalidId>
pub fn join<S>(&self, next: S) -> Result<Id, InvalidId>
Joins something that can be turned into an identifier to the end of this Id.
§Error
Errors if the next is not a valid identifier
Sourcepub fn is_shorthand(&self, repr: &str) -> bool
pub fn is_shorthand(&self, repr: &str) -> bool
Check if the given representation is a valid shorthand.
pub fn is_shorthand_this(&self, repr: &str) -> bool
Sourcepub fn ancestors(&self) -> impl Iterator<Item = &Id>
pub fn ancestors(&self) -> impl Iterator<Item = &Id>
Gets the ancestors of this id.
For example, the ancestors of root:inner:task
would be
root:inner:task
root:inner
root
pub fn iter(&self) -> Iter<'_> ⓘ
pub fn as_path(&self) -> PathBuf
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ProjectId
impl<'de> Deserialize<'de> for ProjectId
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProjectId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProjectId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<ProjectId> for ProjectPathBuf
impl From<ProjectId> for ProjectPathBuf
Source§fn from(value: ProjectId) -> ProjectPathBuf
fn from(value: ProjectId) -> ProjectPathBuf
Converts to this type from the input type.
Source§impl GetProjectId for ProjectId
impl GetProjectId for ProjectId
Source§impl Serialize for ProjectId
impl Serialize for ProjectId
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for ProjectId
impl 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 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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
Compare self to
key
and return true
if they are equal.Source§impl<T> InstanceOf for T
impl<T> InstanceOf for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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 more