Trait vapcore_light::request::IncompleteRequest[][src]

pub trait IncompleteRequest: Sized {
    type Complete;
    type Response: ResponseLike;
    fn check_outputs<F>(&self, f: F) -> Result<(), NoSuchOutput>
    where
        F: FnMut(usize, usize, OutputKind) -> Result<(), NoSuchOutput>
;
fn note_outputs<F>(&self, f: F)
    where
        F: FnMut(usize, OutputKind)
;
fn fill<F>(&mut self, oracle: F)
    where
        F: Fn(usize, usize) -> Result<Output, NoSuchOutput>
;
fn complete(self) -> Result<Self::Complete, NoSuchOutput>;
fn adjust_refs<F>(&mut self, mapping: F)
    where
        F: FnMut(usize) -> usize
; }

A potentially incomplete request.

Associated Types

type Complete[src]

The complete variant of this request.

type Response: ResponseLike[src]

The response to this request.

Loading content...

Required methods

fn check_outputs<F>(&self, f: F) -> Result<(), NoSuchOutput> where
    F: FnMut(usize, usize, OutputKind) -> Result<(), NoSuchOutput>, 
[src]

Check prior outputs against the needed inputs.

This is called to ensure consistency of this request with others in the same packet.

fn note_outputs<F>(&self, f: F) where
    F: FnMut(usize, OutputKind), 
[src]

Note that this request will produce the following outputs.

fn fill<F>(&mut self, oracle: F) where
    F: Fn(usize, usize) -> Result<Output, NoSuchOutput>, 
[src]

Fill fields of the request.

This function is provided an “output oracle” which allows fetching of prior request outputs. Only outputs previously checked with check_outputs may be available.

fn complete(self) -> Result<Self::Complete, NoSuchOutput>[src]

Attempt to convert this request into its complete variant. Will succeed if all fields have been filled, will fail otherwise.

fn adjust_refs<F>(&mut self, mapping: F) where
    F: FnMut(usize) -> usize
[src]

Adjust back-reference request indices.

Loading content...

Implementors

impl IncompleteRequest for CheckedRequest[src]

type Complete = CompleteRequest

type Response = Response

impl IncompleteRequest for Request[src]

type Complete = CompleteRequest

type Response = Response

impl IncompleteRequest for vapcore_light::request::account::Incomplete[src]

type Complete = Complete

type Response = Response

impl IncompleteRequest for vapcore_light::request::block_body::Incomplete[src]

type Complete = Complete

type Response = Response

impl IncompleteRequest for vapcore_light::request::block_receipts::Incomplete[src]

type Complete = Complete

type Response = Response

impl IncompleteRequest for vapcore_light::request::contract_code::Incomplete[src]

type Complete = Complete

type Response = Response

impl IncompleteRequest for vapcore_light::request::epoch_signal::Incomplete[src]

type Complete = Complete

type Response = Response

impl IncompleteRequest for vapcore_light::request::execution::Incomplete[src]

type Complete = Complete

type Response = Response

impl IncompleteRequest for vapcore_light::request::header::Incomplete[src]

type Complete = Complete

type Response = Response

impl IncompleteRequest for vapcore_light::request::header_proof::Incomplete[src]

type Complete = Complete

type Response = Response

impl IncompleteRequest for vapcore_light::request::storage::Incomplete[src]

type Complete = Complete

type Response = Response

impl IncompleteRequest for vapcore_light::request::transaction_index::Incomplete[src]

type Complete = Complete

type Response = Response

Loading content...