pub struct WorkerScriptPut {
pub bindings: Option<Option<Value>>,
pub compatibility_date: Option<String>,
pub compatibility_flags: Option<Vec<String>>,
pub main_module: Option<String>,
pub script: Option<String>,
}Fields§
§bindings: Option<Option<Value>>§compatibility_date: Option<String>CompatibilityDate pins which Workers runtime behaviour the script runs under, as a plain calendar date ("2024-01-01"). Absent leaves the account’s own default in force.
compatibility_flags: Option<Vec<String>>CompatibilityFlags turn individual runtime behaviours on or off around that date ("nodejs_compat"), in Cloudflare’s own flag vocabulary. Absent means the date alone decides.
main_module: Option<String>MainModule is the module file the runtime starts at. Absent means "worker.js".
script: Option<String>Script means two things on this route, and the document says so in both places it appears: the PATH segment names the Worker to publish, and the BODY field carries that Worker’s ES-module source — the code itself, never a name or a URL. A blank or absent source is refused; there is no empty Worker.
Implementations§
Source§impl WorkerScriptPut
impl WorkerScriptPut
pub fn new() -> WorkerScriptPut
Trait Implementations§
Source§impl Clone for WorkerScriptPut
impl Clone for WorkerScriptPut
Source§fn clone(&self) -> WorkerScriptPut
fn clone(&self) -> WorkerScriptPut
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 WorkerScriptPut
impl Debug for WorkerScriptPut
Source§impl Default for WorkerScriptPut
impl Default for WorkerScriptPut
Source§fn default() -> WorkerScriptPut
fn default() -> WorkerScriptPut
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for WorkerScriptPut
impl<'de> Deserialize<'de> for WorkerScriptPut
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 WorkerScriptPut
impl PartialEq for WorkerScriptPut
Source§impl Serialize for WorkerScriptPut
impl Serialize for WorkerScriptPut
impl StructuralPartialEq for WorkerScriptPut
Auto Trait Implementations§
impl Freeze for WorkerScriptPut
impl RefUnwindSafe for WorkerScriptPut
impl Send for WorkerScriptPut
impl Sync for WorkerScriptPut
impl Unpin for WorkerScriptPut
impl UnsafeUnpin for WorkerScriptPut
impl UnwindSafe for WorkerScriptPut
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