pub struct Source {
pub hash: CodeHash,
pub language: SourceLanguage,
pub compiler: SourceCompiler,
pub contract_binary: Option<SourceContractBinary>,
pub build_info: Option<Map<String, Value>>,
}Expand description
Information about the contract’s binary (for PolkaVM).
Fields§
§hash: CodeHashThe hash of the contract’s binary.
language: SourceLanguageThe language used to write the contract.
compiler: SourceCompilerThe compiler used to compile the contract.
contract_binary: Option<SourceContractBinary>The actual binary of the contract (compiled for PolkaVM). Used to optionally bundle the code with the metadata.
build_info: Option<Map<String, Value>>Extra information about the environment in which the contract was built.
Useful for producing deterministic builds.
Implementations§
Source§impl Source
impl Source
Sourcepub fn new(
contract_binary: Option<SourceContractBinary>,
hash: CodeHash,
language: SourceLanguage,
compiler: SourceCompiler,
build_info: Option<Map<String, Value>>,
) -> Self
pub fn new( contract_binary: Option<SourceContractBinary>, hash: CodeHash, language: SourceLanguage, compiler: SourceCompiler, build_info: Option<Map<String, Value>>, ) -> Self
Constructs a new InkProjectSource.
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