Struct maelstrom_base::JobSpec
source · pub struct JobSpec {
pub program: Utf8PathBuf,
pub arguments: Vec<String>,
pub environment: Vec<String>,
pub layers: NonEmpty<Sha256Digest>,
pub devices: EnumSet<JobDevice>,
pub mounts: Vec<JobMount>,
pub enable_loopback: bool,
pub enable_writable_file_system: bool,
pub working_directory: Utf8PathBuf,
pub user: UserId,
pub group: GroupId,
}Expand description
All necessary information for the worker to execute a job.
Fields§
§program: Utf8PathBuf§arguments: Vec<String>§environment: Vec<String>§layers: NonEmpty<Sha256Digest>§devices: EnumSet<JobDevice>§mounts: Vec<JobMount>§enable_loopback: bool§enable_writable_file_system: bool§working_directory: Utf8PathBuf§user: UserId§group: GroupIdImplementations§
source§impl JobSpec
impl JobSpec
pub fn new( program: impl Into<String>, layers: impl Into<NonEmpty<Sha256Digest>> ) -> Self
pub fn arguments<I, T>(self, arguments: I) -> Self
pub fn environment<I, T>(self, environment: I) -> Self
pub fn devices(self, devices: impl IntoIterator<Item = JobDevice>) -> Self
pub fn mounts(self, mounts: impl IntoIterator<Item = JobMount>) -> Self
pub fn enable_loopback(self, enable_loopback: bool) -> Self
pub fn enable_writable_file_system( self, enable_writable_file_system: bool ) -> Self
pub fn working_directory( self, working_directory: impl Into<Utf8PathBuf> ) -> Self
pub fn user(self, user: impl Into<UserId>) -> Self
pub fn group(self, group: impl Into<GroupId>) -> Self
Trait Implementations§
source§impl<'de> Deserialize<'de> for JobSpec
impl<'de> Deserialize<'de> for JobSpec
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 JobSpec
impl PartialEq for JobSpec
impl StructuralPartialEq for JobSpec
Auto Trait Implementations§
impl RefUnwindSafe for JobSpec
impl Send for JobSpec
impl Sync for JobSpec
impl Unpin for JobSpec
impl UnwindSafe for JobSpec
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