Skip to main content

WriteGrib2Message

Trait WriteGrib2Message 

Source
pub trait WriteGrib2Message {
    type S1<'a>: WriteGrib2Ident
       where Self: 'a;
    type Item<'a>: WriteGrib2MessageIterL1
       where Self: 'a;
    type Iter<'a>: Iterator<Item = Self::Item<'a>>
       where Self: 'a;

    // Required methods
    fn discipline(&self) -> u8;
    fn section1(&self) -> &Self::S1<'_>;
    fn iter(&self) -> Self::Iter<'_>;

    // Provided methods
    fn reserved(&self) -> [u8; 2] { ... }
    fn num_octets(&self) -> usize { ... }
    fn write(&self, buf: &mut [u8]) -> Result<usize, &'static str> { ... }
}
Expand description

A functionality to write an entire GRIB2 message. This trait works in conjunction with WriteGrib2MessageIterL1, WriteGrib2MessageIterL2, and WriteGrib2MessageIterL3 to write the message.

Required Associated Types§

Source

type S1<'a>: WriteGrib2Ident where Self: 'a

Source

type Item<'a>: WriteGrib2MessageIterL1 where Self: 'a

Source

type Iter<'a>: Iterator<Item = Self::Item<'a>> where Self: 'a

Required Methods§

Source

fn discipline(&self) -> u8

Source

fn section1(&self) -> &Self::S1<'_>

Source

fn iter(&self) -> Self::Iter<'_>

Provided Methods§

Source

fn reserved(&self) -> [u8; 2]

Source

fn num_octets(&self) -> usize

Source

fn write(&self, buf: &mut [u8]) -> Result<usize, &'static str>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'d, I, L, G, P> WriteGrib2Message for MultiGridGrib2Message<'d, I, L, G, P>

Source§

type S1<'a> = I where Self: 'a

Source§

type Item<'a> = (&'a Option<L>, &'a Vec<(G, P, GpvEncoder<'d>)>) where Self: 'a

Source§

type Iter<'a> = Once<(&'a Option<L>, &'a Vec<(G, P, GpvEncoder<'d>)>)> where Self: 'a

Source§

impl<'d, I, L, G, P> WriteGrib2Message for MultiProductGrib2Message<'d, I, L, G, P>

Source§

type S1<'a> = I where Self: 'a

Source§

type Item<'a> = (&'a Option<L>, &'a G, &'a Vec<(P, GpvEncoder<'d>)>) where Self: 'a

Source§

type Iter<'a> = Once<(&'a Option<L>, &'a G, &'a Vec<(P, GpvEncoder<'d>)>)> where Self: 'a

Source§

impl<'d, I, L, G, P> WriteGrib2Message for SingleGrib2Message<'d, I, L, G, P>

Source§

type S1<'a> = I where Self: 'a

Source§

type Item<'a> = (&'a Option<L>, &'a G, &'a P, &'a GpvEncoder<'d>) where Self: 'a

Source§

type Iter<'a> = Once<(&'a Option<L>, &'a G, &'a P, &'a GpvEncoder<'d>)> where Self: 'a