Module sample

Source
Expand description

The payload that is received by a Subscriber.

§Example

use iceoryx2::prelude::*;

while let Some(sample) = subscriber.receive()? {
    println!("received: {:?}", *sample);
    println!("header publisher id {:?}", sample.header().publisher_id());
}

Structs§

Sample
It stores the payload and is acquired by the Subscriber whenever it receives new data from a Publisher via Subscriber::receive().