pub struct WasmUpload {
pub name: String,
pub path: Option<String>,
pub data: Option<Vec<u8>>,
pub description: Option<String>,
}Expand description
B-110 — describes a WASM module upload to WasmResource::upload.
Supply the module bytes either by file path (read at upload time) or as
raw data. Exactly one of the two must be set — WasmResource::upload
returns a PulseError::InvalidConfig otherwise.
Fields§
§name: StringModule name referenced by wasm(module = ...).
path: Option<String>Filesystem path to the .wasm file. Mutually exclusive with data.
data: Option<Vec<u8>>Raw module bytes. Mutually exclusive with path.
description: Option<String>Optional human-readable description stored alongside the module.
Implementations§
Source§impl WasmUpload
impl WasmUpload
Sourcepub fn from_path(name: impl Into<String>, path: impl Into<String>) -> Self
pub fn from_path(name: impl Into<String>, path: impl Into<String>) -> Self
Upload from a filesystem path to the .wasm file.
Sourcepub fn from_bytes(name: impl Into<String>, data: Vec<u8>) -> Self
pub fn from_bytes(name: impl Into<String>, data: Vec<u8>) -> Self
Upload from raw module bytes.
Sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
Attach a human-readable description.
Trait Implementations§
Source§impl Clone for WasmUpload
impl Clone for WasmUpload
Source§impl Debug for WasmUpload
impl Debug for WasmUpload
Auto Trait Implementations§
impl Freeze for WasmUpload
impl RefUnwindSafe for WasmUpload
impl Send for WasmUpload
impl Sync for WasmUpload
impl Unpin for WasmUpload
impl UnsafeUnpin for WasmUpload
impl UnwindSafe for WasmUpload
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