[][src]Trait concordium_std::Get

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

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

pub fn get(&mut self) -> Result<T, ParseError>[src]

Loading content...

Implementors

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

Loading content...