pub struct TaskId(/* private fields */);
Expand description
How tasks are referenced throughout projects.
All tasks must have an associated TaskId.
Implementations§
Source§impl TaskId
impl TaskId
pub fn new<S>(s: S) -> Result<TaskId, InvalidId>
Sourcepub fn prop<T>(&self, name: &str) -> Result<Prop<T>, InvalidId>
pub fn prop<T>(&self, name: &str) -> Result<Prop<T>, InvalidId>
Creates a new empty property. Does not register said property
Sourcepub fn vec_prop<T>(&self, name: &str) -> Result<VecProp<T>, InvalidId>
pub fn vec_prop<T>(&self, name: &str) -> Result<VecProp<T>, InvalidId>
Creates a new vec property. Does not register said property
Sourcepub fn project_id(&self) -> Option<ProjectId>
pub fn project_id(&self) -> Option<ProjectId>
Gets the project id that contains this task.
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 Buildable for TaskId
impl Buildable for TaskId
Source§fn get_dependencies(
&self,
_project: &Project,
) -> Result<HashSet<TaskId>, PayloadError<ProjectError>>
fn get_dependencies( &self, _project: &Project, ) -> Result<HashSet<TaskId>, PayloadError<ProjectError>>
Gets the dependencies required to build this task
Source§impl<'de> Deserialize<'de> for TaskId
impl<'de> Deserialize<'de> for TaskId
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TaskId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TaskId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<TaskId> for BuildableObject
impl From<TaskId> for BuildableObject
Source§fn from(c: TaskId) -> BuildableObject
fn from(c: TaskId) -> BuildableObject
Converts to this type from the input type.
Source§impl From<TaskId> for TaskPathBuf
impl From<TaskId> for TaskPathBuf
Source§fn from(value: TaskId) -> TaskPathBuf
fn from(value: TaskId) -> TaskPathBuf
Converts to this type from the input type.
Source§impl Serialize for TaskId
impl Serialize for TaskId
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 TaskId
impl StructuralPartialEq for TaskId
Auto Trait Implementations§
impl Freeze for TaskId
impl RefUnwindSafe for TaskId
impl Send for TaskId
impl Sync for TaskId
impl Unpin for TaskId
impl UnwindSafe for TaskId
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<B> GetBuildable for B
impl<B> GetBuildable for B
Source§fn as_buildable(&self) -> BuildableObject
fn as_buildable(&self) -> BuildableObject
Returns a dependency which contains the tasks which build this object.
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<B> IntoBuildable for Bwhere
B: Buildable,
impl<B> IntoBuildable for Bwhere
B: Buildable,
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