Skip to main content

WriteGrib2MessageIterL1

Trait WriteGrib2MessageIterL1 

Source
pub trait WriteGrib2MessageIterL1 {
    type S2<'a>: WriteGrib2LocalUse
       where Self: 'a;
    type Item<'a>: WriteGrib2MessageIterL2
       where Self: 'a;
    type Iter<'a>: Iterator<Item = Self::Item<'a>>
       where Self: 'a;

    // Required methods
    fn section2(&self) -> Option<&Self::S2<'_>>;
    fn iter(&self) -> Self::Iter<'_>;

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

A functionality to write elements of the L1 iterator in a GRIB2 message. This trait works in conjunction with WriteGrib2Message, WriteGrib2MessageIterL2, and WriteGrib2MessageIterL3 to write the message.

Required Associated Types§

Source

type S2<'a>: WriteGrib2LocalUse where Self: 'a

Source

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

Source

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

Required Methods§

Source

fn section2(&self) -> Option<&Self::S2<'_>>

Source

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

Provided Methods§

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".

Implementations on Foreign Types§

Source§

impl<'a, 'd, L, G, P> WriteGrib2MessageIterL1 for (&'a Option<L>, &'a G, &'a P, &'a GpvEncoder<'d>)

Source§

type S2<'s> = L where Self: 's

Source§

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

Source§

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

Source§

fn section2(&self) -> Option<&Self::S2<'_>>

Source§

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

Source§

impl<'a, 'd, L, G, P> WriteGrib2MessageIterL1 for (&'a Option<L>, &'a G, &'a Vec<(P, GpvEncoder<'d>)>)

Source§

type S2<'s> = L where Self: 's

Source§

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

Source§

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

Source§

fn section2(&self) -> Option<&Self::S2<'_>>

Source§

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

Source§

impl<'a, 'd, L, G, P> WriteGrib2MessageIterL1 for (&'a Option<L>, &'a Vec<(G, P, GpvEncoder<'d>)>)

Source§

type S2<'s> = L where Self: 's

Source§

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

Source§

type Iter<'s> = Iter<'a, (G, P, GpvEncoder<'d>)> where Self: 's

Source§

fn section2(&self) -> Option<&Self::S2<'_>>

Source§

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

Implementors§