pub struct ScriptProcessDefinition {
pub language: String,
pub code: Option<String>,
pub source: Option<ExternalResourceDefinition>,
pub stdin: Option<String>,
pub arguments: Option<OneOfRunArguments>,
pub environment: Option<HashMap<String, String>>,
}Expand description
Represents the definition of a script evaluation process
Fields§
§language: StringGets/sets the language of the script to run
code: Option<String>Gets/sets the script’s code. Required if ‘source’ has not been set
source: Option<ExternalResourceDefinition>Gets the the script’s source. Required if ‘code’ has not been set
stdin: Option<String>Gets/sets the data to pass to the process via stdin
arguments: Option<OneOfRunArguments>Gets/sets the arguments to pass to the script. Can be either a list of strings (argv) or a key/value mapping.
environment: Option<HashMap<String, String>>Gets/sets a key/value mapping of the environment variables, if any, to use when running the configured process
Implementations§
Source§impl ScriptProcessDefinition
impl ScriptProcessDefinition
Sourcepub fn from_code(
language: &str,
code: String,
stdin: Option<String>,
arguments: Option<OneOfRunArguments>,
environment: Option<HashMap<String, String>>,
) -> Self
pub fn from_code( language: &str, code: String, stdin: Option<String>, arguments: Option<OneOfRunArguments>, environment: Option<HashMap<String, String>>, ) -> Self
Initializes a new script from code
Sourcepub fn from_source(
language: &str,
source: ExternalResourceDefinition,
stdin: Option<String>,
arguments: Option<OneOfRunArguments>,
environment: Option<HashMap<String, String>>,
) -> Self
pub fn from_source( language: &str, source: ExternalResourceDefinition, stdin: Option<String>, arguments: Option<OneOfRunArguments>, environment: Option<HashMap<String, String>>, ) -> Self
Initializes a new script from an external resource
Trait Implementations§
Source§impl Clone for ScriptProcessDefinition
impl Clone for ScriptProcessDefinition
Source§fn clone(&self) -> ScriptProcessDefinition
fn clone(&self) -> ScriptProcessDefinition
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ScriptProcessDefinition
impl Debug for ScriptProcessDefinition
Source§impl Default for ScriptProcessDefinition
impl Default for ScriptProcessDefinition
Source§fn default() -> ScriptProcessDefinition
fn default() -> ScriptProcessDefinition
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ScriptProcessDefinition
impl<'de> Deserialize<'de> for ScriptProcessDefinition
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 ScriptProcessDefinition
impl PartialEq for ScriptProcessDefinition
Source§fn eq(&self, other: &ScriptProcessDefinition) -> bool
fn eq(&self, other: &ScriptProcessDefinition) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ScriptProcessDefinition
impl Serialize for ScriptProcessDefinition
impl StructuralPartialEq for ScriptProcessDefinition
Auto Trait Implementations§
impl Freeze for ScriptProcessDefinition
impl RefUnwindSafe for ScriptProcessDefinition
impl Send for ScriptProcessDefinition
impl Sync for ScriptProcessDefinition
impl Unpin for ScriptProcessDefinition
impl UnsafeUnpin for ScriptProcessDefinition
impl UnwindSafe for ScriptProcessDefinition
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