pub struct Declaration {
pub name: String,
pub file: String,
pub format: String,
pub task_id: Option<usize>,
pub description: String,
}Expand description
A file a worker declares in its attempt directory.
Fields§
§name: StringName agents use (jobs artifact ID NAME); unique in the attempt.
file: StringFile name in the attempt directory, no path.
format: StringOne of FORMATS.
task_id: Option<usize>The task that writes it, if one does.
description: StringWhat it holds and what it is for, for agents.
Implementations§
Source§impl Declaration
impl Declaration
Sourcepub fn records(name: impl Into<String>, file: impl Into<String>) -> Self
pub fn records(name: impl Into<String>, file: impl Into<String>) -> Self
A journal of checked records (see FORMATS).
Sourcepub fn json(name: impl Into<String>, file: impl Into<String>) -> Self
pub fn json(name: impl Into<String>, file: impl Into<String>) -> Self
A JSON document replaced atomically (see FORMATS).
pub fn task(self, task_id: usize) -> Self
pub fn describe(self, description: impl Into<String>) -> Self
Trait Implementations§
Source§impl Clone for Declaration
impl Clone for Declaration
Source§impl Debug for Declaration
impl Debug for Declaration
Source§impl<'de> Deserialize<'de> for Declaration
impl<'de> Deserialize<'de> for Declaration
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
Source§impl PartialEq for Declaration
impl PartialEq for Declaration
Source§impl Serialize for Declaration
impl Serialize for Declaration
impl StructuralPartialEq for Declaration
Auto Trait Implementations§
impl Freeze for Declaration
impl RefUnwindSafe for Declaration
impl Send for Declaration
impl Sync for Declaration
impl Unpin for Declaration
impl UnsafeUnpin for Declaration
impl UnwindSafe for Declaration
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