pub struct Builder(_, _);
Expand description

An object which can be used to construct a script piece by piece.

Implementations

Creates a new empty script

The length in bytes of the script

Whether the script is the empty script

Adds instructions to push an integer onto the stack. Integers are encoded as little-endian signed-magnitude numbers, but there are dedicated opcodes to push some small integers.

Adds instructions to push an integer onto the stack, using the explicit encoding regardless of the availability of dedicated opcodes.

Adds instructions to push some arbitrary data onto the stack

Pushes a public key

Adds a single opcode to the script

Adds an OP_VERIFY to the script, unless the most-recently-added opcode has an alternate VERIFY form, in which case that opcode is replaced. e.g. OP_CHECKSIG will become OP_CHECKSIGVERIFY.

Converts the Builder into an unmodifiable Script

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Adds an individual opcode to the script

Returns the “default value” for a type. Read more

Formats the value using the given formatter. Read more

Creates a new script from an existing vector

Performs the conversion.

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

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.