pub struct Preview {Show 14 fields
pub content: Option<String>,
pub path: Option<String>,
pub script_hash: Option<String>,
pub args: HashMap<String, Value>,
pub language: Option<ScriptLang>,
pub tag: Option<String>,
pub kind: Option<Kind>,
pub dedicated_worker: Option<bool>,
pub lock: Option<String>,
pub flow_path: Option<String>,
pub modules: Option<Option<HashMap<String, ScriptModule>>>,
pub temp_script_refs: Option<Option<HashMap<String, String>>>,
pub on_behalf_of: Option<Option<String>>,
pub viewer_data_access: Option<Option<bool>>,
}Fields§
§content: Option<String>The code to run
path: Option<String>The path to the script
script_hash: Option<String>The hash of the script
args: HashMap<String, Value>The arguments to pass to the script or flow
language: Option<ScriptLang>§tag: Option<String>§kind: Option<Kind>§dedicated_worker: Option<bool>§lock: Option<String>§flow_path: Option<String>§modules: Option<Option<HashMap<String, ScriptModule>>>Additional script modules keyed by relative file path
temp_script_refs: Option<Option<HashMap<String, String>>>Map of relative-import script path -> temp storage hash so the preview job resolves those imports from not-yet-deployed local content instead of the deployed script
on_behalf_of: Option<Option<String>>Run the preview as this identity (an email, u/<username> or g/<group>) instead of the caller. Naming anyone other than yourself requires being an admin or a member of wm_deployers.
viewer_data_access: Option<Option<bool>>Data table and object storage access as the caller rather than as the job’s identity, as a full-code app’s inline runnable flagged viewer_data_access does for its viewer.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Preview
impl<'de> Deserialize<'de> for Preview
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 Preview
Auto Trait Implementations§
impl Forget for Preview
impl Freeze for Previewwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<(String, Value)>: Freeze,
PhantomData<(String, ScriptModule)>: Freeze,
PhantomData<(String, String)>: Freeze,
impl Move for Preview
impl RefUnwindSafe for Preview
impl Send for Preview
impl Sync for Preview
impl Unpin for Preview
impl UnsafeUnpin for Previewwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<(String, Value)>: UnsafeUnpin,
PhantomData<(String, ScriptModule)>: UnsafeUnpin,
PhantomData<(String, String)>: UnsafeUnpin,
impl UnwindSafe for Previewwhere
RawVecInner: UnwindSafe,
HashMap<String, Value>: UnwindSafe,
HashMap<String, ScriptModule>: UnwindSafe,
HashMap<String, String>: UnwindSafe,
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