Trait concordium_contracts_common::Get[][src]

pub trait Get<T> {
    fn get(&mut self) -> ParseResult<T>;
}

A more convenient wrapper around Deserial that makes it easier to write deserialization code. It has a blanked implementation for any read and serialize pair. The key idea is that the type to deserialize is inferred from the context, enabling one to write, for example,

   let x = source.get()?;
   let y = source.get()?;

where source is any type that implements Read.

Required methods

fn get(&mut self) -> ParseResult<T>[src]

Loading content...

Implementors

impl<R: Read, T: Deserial> Get<T> for R[src]

Loading content...