Struct ethcontract::contract::ViewMethodBuilder[][src]

#[must_use = "view methods do nothing unless you `.call()` them"]
pub struct ViewMethodBuilder<T: Transport, R: Tokenize> { pub m: MethodBuilder<T, R>, pub block: Option<BlockId>, }
Expand description

Data used for building a contract method call. The view method builder can’t directly send transactions and is for read only method calls.

Fields

m: MethodBuilder<T, R>

method parameters

block: Option<BlockId>

optional block number

Implementations

Create a new ViewMethodBuilder by demoting a MethodBuilder.

Apply method defaults to this builder.

Specify the account the transaction is being sent from.

Secify amount of gas to use, if not specified then a gas estimate will be used.

Specify the gas price to use, if not specified then the estimated gas price will be used.

Specify what how much ETH to transfer with the transaction, if not specified then no ETH will be sent.

Specify the nonce for the transation, if not specified will use the current transaction count for the signing account.

Call a contract method. Contract calls do not modify the blockchain and as such do not require gas or signing.

Adds this view method to a batch. Allows execution with other contract calls in one roundtrip The returned future only resolve once batch is resolved. Panics, if batch is dropped before executing

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

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

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)

recently added

Uses borrowed data to replace owned data, usually by cloning. 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.