Struct cbor::decoder::Kernel
[−]
[src]
pub struct Kernel<R> { /* fields omitted */ }This decoding kernel reads from an underlying std::io::Read type
primitive CBOR values such as unsigned and signed integers as well
as raw bytes.
It forms the basis on which Decoder and GenericDecoder add logic
for handling Tags, heterogenous data and generic value decoding.
Methods
impl<R: ReadBytesExt> Kernel<R>[src]
fn new(r: R) -> Kernel<R>
fn into_reader(self) -> R
fn typeinfo(&mut self) -> DecodeResult<TypeInfo>
fn simple(&mut self, ti: &TypeInfo) -> DecodeResult<Simple>
fn bool(&mut self, ti: &TypeInfo) -> DecodeResult<bool>
fn u8(&mut self, ti: &TypeInfo) -> DecodeResult<u8>
fn u16(&mut self, ti: &TypeInfo) -> DecodeResult<u16>
fn u32(&mut self, ti: &TypeInfo) -> DecodeResult<u32>
fn u64(&mut self, ti: &TypeInfo) -> DecodeResult<u64>
fn i8(&mut self, ti: &TypeInfo) -> DecodeResult<i8>
fn i16(&mut self, ti: &TypeInfo) -> DecodeResult<i16>
fn i32(&mut self, ti: &TypeInfo) -> DecodeResult<i32>
fn i64(&mut self, ti: &TypeInfo) -> DecodeResult<i64>
fn int(&mut self, ti: &TypeInfo) -> DecodeResult<Int>
fn f16(&mut self, ti: &TypeInfo) -> DecodeResult<f32>
fn f32(&mut self, ti: &TypeInfo) -> DecodeResult<f32>
fn f64(&mut self, ti: &TypeInfo) -> DecodeResult<f64>
fn unsigned(&mut self, first: u8) -> DecodeResult<u64>
Decode first and potentially the following bytes as an
unsigned value following the rules of major type 0.
fn raw_data(&mut self, begin: u8, max_len: usize) -> DecodeResult<Vec<u8>>
Read begin as the length and return that many raw bytes.
If length is greater than the given max_len, DecodeError::TooLong
is returned instead.