[][src]Struct fabric_contract::prelude::ContractDefn

pub struct ContractDefn { /* fields omitted */ }

Internal definition of a contract

Implementations

impl ContractDefn[src]

pub fn new(c: Box<dyn Contract + Send>) -> ContractDefn[src]

pub fn add_tx_fn(self: &mut ContractDefn, tx: TransactionFn)[src]

pub fn add_new_method(
    self: &mut ContractDefn,
    name: &str,
    func: fn(_: &str) -> bool
)
[src]

pub fn get_txfn(
    self: &ContractDefn,
    name: &str
) -> Result<&TransactionFn, String>
[src]

pub fn invoke(
    self: &ContractDefn,
    ctx: &TransactionContext,
    name: String,
    args: &[Vec<u8>],
    transient: &HashMap<String, Vec<u8>>
) -> Result<WireBuffer, ContractError>
[src]

Auto Trait Implementations

impl !RefUnwindSafe for ContractDefn

impl Send for ContractDefn

impl !Sync for ContractDefn

impl Unpin for ContractDefn

impl !UnwindSafe for ContractDefn

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.