pub struct Resource {
pub setup: TaskId,
pub cleanup: TaskId,
pub users: Vec<TaskId>,
pub blocking: bool,
pub unschedulable_timeout_ms: Option<u64>,
}Expand description
A resource: one thing of two parts, each a task of the DAG, both always there (decision 259).
Fields§
§setup: TaskIdThe task that creates it; its ID is the resource’s.
cleanup: TaskIdThe task that undoes it, once every user is done.
users: Vec<TaskId>The tasks that need it.
blocking: boolWhether what follows its group waits for its cleanup (decision 266); the edges from the cleanup say so, this is for showing them (decision 272).
unschedulable_timeout_ms: Option<u64>How long a user may stay unschedulable before it fails, so the cleanup can run
(decision 273); none: no limit.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Resource
impl<'de> Deserialize<'de> for Resource
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 Resource
Source§impl JsonSchema for Resource
impl JsonSchema for Resource
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for Resource
Auto Trait Implementations§
impl Freeze for Resource
impl RefUnwindSafe for Resource
impl Send for Resource
impl Sync for Resource
impl Unpin for Resource
impl UnsafeUnpin for Resource
impl UnwindSafe for Resource
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