pub struct WorkScope {
pub projects: Vec<ScopeMember<ProjectId>>,
pub assets: Vec<ScopeMember<AssetId>>,
}Expand description
Project and asset membership filter; an empty axis does not filter.
A work item is in scope when it passes every non-empty axis:
- projects: its project is one of the listed projects or a descendant of one;
- assets: it names at least one listed asset, and every asset it writes is listed. Work naming no assets never positively matches, so it is outside an asset scope.
Fields§
§projects: Vec<ScopeMember<ProjectId>>Project subtrees to include.
assets: Vec<ScopeMember<AssetId>>Assets the returned work must fit.
Implementations§
Source§impl WorkScope
impl WorkScope
Sourcepub fn resolve<'a>(
plan: &Plan,
project_keys: impl IntoIterator<Item = &'a str>,
asset_keys: impl IntoIterator<Item = &'a str>,
) -> Result<Self, ScopeError>
pub fn resolve<'a>( plan: &Plan, project_keys: impl IntoIterator<Item = &'a str>, asset_keys: impl IntoIterator<Item = &'a str>, ) -> Result<Self, ScopeError>
Resolve human keys against the plan, rejecting unknown keys rather than matching nothing.
Sourcepub fn is_unscoped(&self) -> bool
pub fn is_unscoped(&self) -> bool
Whether neither axis restricts membership.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for WorkScope
impl<'de> Deserialize<'de> for WorkScope
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
impl Eq for WorkScope
impl StructuralPartialEq for WorkScope
Auto Trait Implementations§
impl Freeze for WorkScope
impl RefUnwindSafe for WorkScope
impl Send for WorkScope
impl Sync for WorkScope
impl Unpin for WorkScope
impl UnsafeUnpin for WorkScope
impl UnwindSafe for WorkScope
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