Struct hotshot_task::dependency::OrDependency
source · pub struct OrDependency<T> {
deps: Vec<BoxFuture<'static, Option<T>>>,
}
Expand description
Defines a dependency that completes when one of it’s dependencies completes
Fields§
§deps: Vec<BoxFuture<'static, Option<T>>>
Dependencies being combined
Implementations§
source§impl<T: Clone + Send + Sync + 'static> OrDependency<T>
impl<T: Clone + Send + Sync + 'static> OrDependency<T>
sourcepub fn from_deps(deps: Vec<impl Dependency<T> + Send + 'static>) -> Self
pub fn from_deps(deps: Vec<impl Dependency<T> + Send + 'static>) -> Self
Creat an OrDependency
from a vec of dependencies
sourcepub fn add_dep(&mut self, dep: impl Dependency<T> + Send + 'static)
pub fn add_dep(&mut self, dep: impl Dependency<T> + Send + 'static)
Add another dependency
Trait Implementations§
source§impl<T: Clone + Send + Sync> Dependency<T> for OrDependency<T>
impl<T: Clone + Send + Sync> Dependency<T> for OrDependency<T>
source§fn or<D: Dependency<T> + Send + 'static>(self, dep: D) -> OrDependency<T>
fn or<D: Dependency<T> + Send + 'static>(self, dep: D) -> OrDependency<T>
Create an or dependency from this dependency and another
Auto Trait Implementations§
impl<T> Freeze for OrDependency<T>
impl<T> !RefUnwindSafe for OrDependency<T>
impl<T> Send for OrDependency<T>
impl<T> !Sync for OrDependency<T>
impl<T> Unpin for OrDependency<T>
impl<T> !UnwindSafe for OrDependency<T>
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