pub struct Source {
pub version: SemVer,
pub digest: Hash256,
pub code: SourceType,
}
Expand description
Specifies the complete source of a wasm module
This contains the version, concrete source ( either local bytes or link to a remote registry ) and hash digest of the compiled module.
Fields§
§version: SemVer
Version of the wasm module
digest: Hash256
Sha3-256 digest of the module
code: SourceType
Concrete source - see SourceType
Implementations§
Source§impl Source
impl Source
Sourcepub fn flatten(self) -> SourceFlattened
pub fn flatten(self) -> SourceFlattened
‘flattens’ the Source
to create a SourceFlattened
Useful for serializers that do not support advanced serde features.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Source
impl<'de> Deserialize<'de> for Source
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
Auto Trait Implementations§
impl Freeze for Source
impl RefUnwindSafe for Source
impl Send for Source
impl Sync for Source
impl Unpin for Source
impl UnwindSafe for Source
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