Skip to main content

WasmDownloadRequest

Struct WasmDownloadRequest 

Source
pub struct WasmDownloadRequest { /* private fields */ }
Expand description

Declarative request descriptor for downloading and executing a dynamic .wasm module.

Implementations§

Source§

impl WasmDownloadRequest

Fluent builder helpers for WasmDownloadRequest.

Source

pub fn partial(url: String, slot_id: String, version: u64) -> Self

Creates a scoped partial-slot .wasm download request.

§Arguments
  • String - Source .wasm URL.
  • String - Target partial slot ID.
  • u64 - Release version number.
§Returns
  • Self - Configured partial download request.
Source

pub fn global(url: String, version: u64) -> Self

Creates a global full-app .wasm download request.

§Arguments
  • String - Source .wasm URL.
  • u64 - Release version number.
§Returns
  • Self - Configured global download request.
Source

pub fn with_checksum(self, checksum: u64) -> Self

Attaches an expected FNV-1a checksum for integrity verification.

§Arguments
  • Self - Source request.
  • u64 - Expected checksum.
§Returns
  • Self - Updated request.
Source

pub fn with_signature(self, signature: String) -> Self

Attaches an expected signature tag for authenticated verification.

§Arguments
  • Self - Source request.
  • String - Expected signature string.
§Returns
  • Self - Updated request.
Source

pub fn with_allow_downgrade(self, allow: bool) -> Self

Allows installing a version lower than or equal to the currently mounted version.

§Arguments
  • Self - Source request.
  • bool - Downgrade permission flag.
§Returns
  • Self - Updated request.
Source

pub fn resolved_cache_key(&self) -> &str

Resolves the effective cache lookup key (cache_key if non-empty, otherwise url).

§Arguments
  • &Self - Request reference.
§Returns
  • &str - Effective cache key.
Source§

impl WasmDownloadRequest

Source

pub fn get_url(&self) -> &String

Source

pub fn get_mut_url(&mut self) -> &mut String

Source

pub fn set_url(&mut self, val: String) -> &mut Self

Source

pub fn get_scope(&self) -> &WasmDynamicScope

Source

pub fn get_mut_scope(&mut self) -> &mut WasmDynamicScope

Source

pub fn set_scope(&mut self, val: WasmDynamicScope) -> &mut Self

Source

pub fn get_version(&self) -> u64

Source

pub fn get_mut_version(&mut self) -> &mut u64

Source

pub fn set_version(&mut self, val: u64) -> &mut Self

Source

pub fn get_expected_checksum(&self) -> u64

Source

pub fn get_mut_expected_checksum(&mut self) -> &mut u64

Source

pub fn set_expected_checksum(&mut self, val: u64) -> &mut Self

Source

pub fn get_expected_signature(&self) -> &String

Source

pub fn get_mut_expected_signature(&mut self) -> &mut String

Source

pub fn set_expected_signature(&mut self, val: String) -> &mut Self

Source

pub fn get_allow_downgrade(&self) -> bool

Source

pub fn get_mut_allow_downgrade(&mut self) -> &mut bool

Source

pub fn set_allow_downgrade(&mut self, val: bool) -> &mut Self

Source

pub fn get_cache_key(&self) -> &String

Source

pub fn get_mut_cache_key(&mut self) -> &mut String

Source

pub fn set_cache_key(&mut self, val: String) -> &mut Self

Source§

impl WasmDownloadRequest

Source

pub fn new(url: String, scope: WasmDynamicScope, version: u64) -> Self

Trait Implementations§

Source§

impl Clone for WasmDownloadRequest

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmDownloadRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for WasmDownloadRequest

Source§

impl Hash for WasmDownloadRequest

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for WasmDownloadRequest

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for WasmDownloadRequest

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.