Unfortunately, the Rust example does not compile due to waitset.attach(&status_condition)? call.
waitset.attach requires the entity E to implement HasStatusCondition. However, HasStatusCondition<T> is only implemented for DataReader<T>. Therefore, the correct call should be waitset.attach(&reader)?;.
Before:
let status_condition = reader.get_status_condition();
let mut waitset = hdds::WaitSet::new();
waitset.attach(&status_condition)?;
After:
let mut waitset = hdds::WaitSet::new();
waitset.attach(&reader)?;
Unfortunately, the Rust example does not compile due to
waitset.attach(&status_condition)?call.waitset.attachrequires the entityEto implementHasStatusCondition. However,HasStatusCondition<T>is only implemented forDataReader<T>. Therefore, the correct call should bewaitset.attach(&reader)?;.Before:
After: