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

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

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<BlockNumber>

optional block number

Methods

impl<T: Transport, R: Detokenizable> ViewMethodBuilder<T, R>[src]

pub fn from_method(method: MethodBuilder<T, R>) -> Self[src]

Create a new ViewMethodBuilder by demoting a MethodBuilder.

pub fn with_defaults(self, defaults: &MethodDefaults) -> Self[src]

Apply method defaults to this builder.

pub fn from(self, value: Address) -> Self[src]

Specify the account the transaction is being sent from.

pub fn gas(self, value: U256) -> Self[src]

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

pub fn gas_price(self, value: GasPrice) -> Self[src]

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

pub fn value(self, value: U256) -> Self[src]

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

pub fn block(self, value: BlockNumber) -> Self[src]

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

impl<T: Transport, R: Detokenizable> ViewMethodBuilder<T, R>[src]

pub fn call(self) -> CallFuture<T, R>[src]

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

Trait Implementations

impl<T: Clone + Transport, R: Clone + Detokenizable> Clone for ViewMethodBuilder<T, R>[src]

impl<T: Debug + Transport, R: Debug + Detokenizable> Debug for ViewMethodBuilder<T, R>[src]

Auto Trait Implementations

impl<T, R> RefUnwindSafe for ViewMethodBuilder<T, R> where
    R: RefUnwindSafe,
    T: RefUnwindSafe

impl<T, R> Send for ViewMethodBuilder<T, R> where
    R: Send,
    T: Send

impl<T, R> Sync for ViewMethodBuilder<T, R> where
    R: Sync,
    T: Sync

impl<T, R> Unpin for ViewMethodBuilder<T, R> where
    R: Unpin,
    T: Unpin

impl<T, R> UnwindSafe for ViewMethodBuilder<T, R> where
    R: UnwindSafe,
    T: UnwindSafe

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

impl<T> Typeable for T where
    T: Any

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,