pub struct Contract<'a> {
    pub parameters: Parameters<'a>,
    pub data: ContractCode<'a>,
    /* private fields */
}Expand description
A complete contract specification requires a parameters section
and a contract section.
Fields§
§parameters: Parameters<'a>§data: ContractCode<'a>Implementations§
Source§impl<'a> Contract<'a>
 
impl<'a> Contract<'a>
Sourcepub fn new(
    contract: ContractCode<'a>,
    parameters: Parameters<'a>,
) -> Contract<'a>
 
pub fn new( contract: ContractCode<'a>, parameters: Parameters<'a>, ) -> Contract<'a>
Returns a contract from contract code and given parameters.
Sourcepub fn key(&self) -> &ContractKey
 
pub fn key(&self) -> &ContractKey
Key portion of the specification.
Sourcepub fn into_code(self) -> ContractCode<'a>
 
pub fn into_code(self) -> ContractCode<'a>
Code portion of the specification.
Trait Implementations§
Source§impl<'de: 'a, 'a> Deserialize<'de> for Contract<'a>
 
impl<'de: 'a, 'a> Deserialize<'de> for Contract<'a>
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
impl Eq for Contract<'_>
Auto Trait Implementations§
impl<'a> Freeze for Contract<'a>
impl<'a> RefUnwindSafe for Contract<'a>
impl<'a> Send for Contract<'a>
impl<'a> Sync for Contract<'a>
impl<'a> Unpin for Contract<'a>
impl<'a> UnwindSafe for Contract<'a>
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