Trait grib::Grib2Read

source ·
pub trait Grib2Read: Read + Seek {
    // Required methods
    fn read_sect0(&mut self) -> Result<Option<(usize, Indicator)>, ParseError>;
    fn read_sect8(&mut self) -> Result<Option<()>, ParseError>;
    fn read_sect_header(&mut self) -> Result<Option<(usize, u8)>, ParseError>;
    fn read_sect_payload(
        &mut self,
        header: &(usize, u8),
    ) -> Result<SectionBody, ParseError>;
    fn read_sect_payload_as_slice(
        &mut self,
        sect: &SectionInfo,
    ) -> Result<Box<[u8]>, ParseError>;
    fn read_sect6_payload(
        &mut self,
        size: usize,
    ) -> Result<SectionBody, ParseError>;
    fn skip_sect7_payload(
        &mut self,
        size: usize,
    ) -> Result<SectionBody, ParseError>;
    fn read_slice_without_offset_check(
        &mut self,
        size: usize,
    ) -> Result<Box<[u8]>, ParseError>;
}

Required Methods§

source

fn read_sect0(&mut self) -> Result<Option<(usize, Indicator)>, ParseError>

Reads Section 0.

source

fn read_sect8(&mut self) -> Result<Option<()>, ParseError>

Reads Section 8.

source

fn read_sect_header(&mut self) -> Result<Option<(usize, u8)>, ParseError>

Reads a common header for Sections 1-7 and returns the section size and number.

source

fn read_sect_payload( &mut self, header: &(usize, u8), ) -> Result<SectionBody, ParseError>

source

fn read_sect_payload_as_slice( &mut self, sect: &SectionInfo, ) -> Result<Box<[u8]>, ParseError>

source

fn read_sect6_payload(&mut self, size: usize) -> Result<SectionBody, ParseError>

source

fn skip_sect7_payload(&mut self, size: usize) -> Result<SectionBody, ParseError>

source

fn read_slice_without_offset_check( &mut self, size: usize, ) -> Result<Box<[u8]>, ParseError>

Implementors§