pub struct SourceFlattened {
pub version: SemVer,
pub digest: Hash256,
/* private fields */
}
Expand description
A ‘flattened’ version of Source
Some serializers do not support all serde features, like untagged enums or flattening.
This struct is a replacement for Source
, in case your serializer cannot properly serialize the Source
type.
In this version, the content of SourceType
is directly inlined into the struct definition using options.
Also the base64 encoding of the wasm bytes is removed in this version.
You can see this as an “on-disk” version of Source
. For transfer over the wire (especially with json !) you should use Source
.
Fields§
§version: SemVer
§digest: Hash256
Sha3-256 digest of the module
Implementations§
Trait Implementations§
Source§impl Clone for SourceFlattened
impl Clone for SourceFlattened
Source§fn clone(&self) -> SourceFlattened
fn clone(&self) -> SourceFlattened
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 SourceFlattened
impl Debug for SourceFlattened
Source§impl<'de> Deserialize<'de> for SourceFlattened
impl<'de> Deserialize<'de> for SourceFlattened
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 SourceFlattened
impl RefUnwindSafe for SourceFlattened
impl Send for SourceFlattened
impl Sync for SourceFlattened
impl Unpin for SourceFlattened
impl UnwindSafe for SourceFlattened
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