packet_formats::gmp

Trait GmpReportGroupRecord

Source
pub trait GmpReportGroupRecord<A: IpAddress> {
    // Required methods
    fn group(&self) -> MulticastAddr<A>;
    fn record_type(&self) -> GroupRecordType;
    fn sources(&self) -> impl Iterator<Item: Borrow<A>> + '_;
}
Expand description

A trait abstracting a multicast group record in MLDv2 or IGMPv3.

This trait facilitates the nested iterators required for implementing group records (iterator of groups, each of which with an iterator of sources) without propagating the inner iterator types far up.

An implementation for tuples of (group, record_type, iterator) is provided.

Required Methods§

Source

fn group(&self) -> MulticastAddr<A>

Returns the multicast group this report refers to.

Source

fn record_type(&self) -> GroupRecordType

Returns record type to insert in the record entry.

Source

fn sources(&self) -> impl Iterator<Item: Borrow<A>> + '_

Returns an iterator over the sources in the report.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<A, I> GmpReportGroupRecord<A> for (MulticastAddr<A>, GroupRecordType, I)
where A: IpAddress, I: Iterator<Item: Borrow<A>> + Clone,

Source§

fn group(&self) -> MulticastAddr<A>

Source§

fn record_type(&self) -> GroupRecordType

Source§

fn sources(&self) -> impl Iterator<Item: Borrow<A>> + '_

Implementors§