Struct sapio::contract::context::Context[][src]

pub struct Context {
    pub network: Network,
    // some fields omitted
}
Expand description

Context is used to track statet during compilation such as remaining value.

Fields

network: Network

which network is the contract building for?

Implementations

create a context instance. Should only happen once at the very top level.

Get this Context’s effect database, for clients

Gets this Context’s Path, but does not clone (left to caller)

Derive a new contextual path

Derive a new contextual path

return the available funds

use the context’s emulator to get a emulated (or not) clause

Compile the compilable item with this context.

return a context with the new amount if amount is smaller or equal to available

decrease the amount available in this context object.

Add funds to the context object (not typically needed)

Get a template builder from this context object

converts a descriptor and an optional AmountRange to a Object object. This can be used for e.g. creating raw SegWit Scripts.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.