Struct contract_metadata::Source
source · [−]pub struct Source {
pub hash: CodeHash,
pub language: SourceLanguage,
pub compiler: SourceCompiler,
pub wasm: Option<SourceWasm>,
}Expand description
Information about the contract’s Wasm code.
Fields
hash: CodeHashThe hash of the contract’s Wasm code.
language: SourceLanguageThe language used to write the contract.
compiler: SourceCompilerThe compiler used to compile the contract.
wasm: Option<SourceWasm>The actual Wasm code of the contract, for optionally bundling the code with the metadata.
Implementations
sourceimpl Source
impl Source
sourcepub fn new(
wasm: Option<SourceWasm>,
hash: CodeHash,
language: SourceLanguage,
compiler: SourceCompiler
) -> Self
pub fn new(
wasm: Option<SourceWasm>,
hash: CodeHash,
language: SourceLanguage,
compiler: SourceCompiler
) -> Self
Constructs a new InkProjectSource.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Source
impl<'de> Deserialize<'de> for Source
sourcefn 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 RefUnwindSafe for Source
impl Send for Source
impl Sync for Source
impl Unpin for Source
impl UnwindSafe for Source
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more