Struct freenet_stdlib::prelude::Contract
source · 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
source§impl PartialEq<Contract<'_>> for Contract<'_>
impl PartialEq<Contract<'_>> for Contract<'_>
impl Eq for Contract<'_>
Auto Trait Implementations§
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