pub struct ApprovedModuleSource { /* private fields */ }Expand description
ApprovedModuleSource
Implementations§
Source§impl ApprovedModuleSource
impl ApprovedModuleSource
Sourcepub const fn chunked(
source_canister: Principal,
source_label: String,
module_hash: Vec<u8>,
chunk_hashes: Vec<Vec<u8>>,
payload_size_bytes: u64,
) -> Self
pub const fn chunked( source_canister: Principal, source_label: String, module_hash: Vec<u8>, chunk_hashes: Vec<Vec<u8>>, payload_size_bytes: u64, ) -> Self
Construct one chunk-store-backed module source.
Sourcepub fn embedded(source_label: String, wasm_module: &'static [u8]) -> Self
pub fn embedded(source_label: String, wasm_module: &'static [u8]) -> Self
Construct one embedded module source from already packaged wasm bytes.
Sourcepub fn source_label(&self) -> &str
pub fn source_label(&self) -> &str
Return the logical source label used for logs and status output.
Sourcepub fn module_hash(&self) -> &[u8] ⓘ
pub fn module_hash(&self) -> &[u8] ⓘ
Return the installable wasm module hash.
Sourcepub fn payload_size(&self) -> String
pub fn payload_size(&self) -> String
Return the formatted module payload size for logs and status output.
Sourcepub const fn payload_size_bytes(&self) -> u64
pub const fn payload_size_bytes(&self) -> u64
Return the raw payload size in bytes.
Sourcepub const fn chunk_count(&self) -> usize
pub const fn chunk_count(&self) -> usize
Return the chunk count when the source is chunk-store-backed.
Sourcepub const fn payload(&self) -> &ApprovedModulePayload
pub const fn payload(&self) -> &ApprovedModulePayload
Return the underlying payload representation.
Trait Implementations§
Source§impl Clone for ApprovedModuleSource
impl Clone for ApprovedModuleSource
Source§fn clone(&self) -> ApprovedModuleSource
fn clone(&self) -> ApprovedModuleSource
Returns a duplicate of the value. Read more
1.0.0 · 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 ApprovedModuleSource
impl Debug for ApprovedModuleSource
Source§impl PartialEq for ApprovedModuleSource
impl PartialEq for ApprovedModuleSource
impl Eq for ApprovedModuleSource
impl StructuralPartialEq for ApprovedModuleSource
Auto Trait Implementations§
impl Freeze for ApprovedModuleSource
impl RefUnwindSafe for ApprovedModuleSource
impl Send for ApprovedModuleSource
impl Sync for ApprovedModuleSource
impl Unpin for ApprovedModuleSource
impl UnsafeUnpin for ApprovedModuleSource
impl UnwindSafe for ApprovedModuleSource
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