pub struct RawScript {
pub input_transforms: HashMap<String, InputTransform>,
pub content: String,
pub language: Language,
pub path: Option<String>,
pub lock: Option<String>,
pub type: Type,
pub tag: Option<String>,
pub concurrent_limit: Option<f64>,
pub concurrency_time_window_s: Option<f64>,
pub custom_concurrency_key: Option<String>,
pub is_trigger: Option<bool>,
pub assets: Option<Vec<RawScriptAssetsInner>>,
}Expand description
RawScript : Inline script with code defined directly in the flow. Use ‘bun’ as default language if unspecified. The script receives arguments from input_transforms
Fields§
§input_transforms: HashMap<String, InputTransform>Map of parameter names to their values (static or JavaScript expressions). These become the script’s input arguments
content: StringThe script source code. Should export a ‘main’ function
language: LanguageProgramming language for this script
path: Option<String>Optional path for saving this script
lock: Option<String>Lock file content for dependencies
type: Type§tag: Option<String>Worker group tag for execution routing
concurrent_limit: Option<f64>Maximum concurrent executions of this script
concurrency_time_window_s: Option<f64>Time window for concurrent_limit
custom_concurrency_key: Option<String>Custom key for grouping concurrent executions
is_trigger: Option<bool>If true, this script is a trigger that can start the flow
assets: Option<Vec<RawScriptAssetsInner>>External resources this script accesses (S3 objects, resources, etc.)
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RawScript
impl<'de> Deserialize<'de> for RawScript
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 StructuralPartialEq for RawScript
Auto Trait Implementations§
impl Freeze for RawScript
impl RefUnwindSafe for RawScript
impl Send for RawScript
impl Sync for RawScript
impl Unpin for RawScript
impl UnwindSafe for RawScript
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