#[repr(u32)]pub enum ViewState {
New = 1,
NotNew = 2,
}
Expand description
Indicates if this data instance has been seen (viewed).
For each instance (identified by the key), the middleware internally maintains a view_state relative to each DataReader. The view_state can either be NEW or NOT_NEW.
The view_state available in the SampleInfo is a snapshot of the view_state of the instance relative to the DataReader used to access the samples at the time the collection was obtained (i.e., at the time read or take was called). The view_state is therefore the same for all samples in the returned collection that refer to the same instance. Once an instance has been detected as not having any “live” writers and all the samples associated with the instance are ‘taken’ from the DataReader, the middleware can reclaim all local resources regarding the instance. Future samples will be treated as ‘never seen’.
Cf. SampleState
See DDS spec v.14 Section 2.2.2.5.1.8 Interpretation of the SampleInfo view_state
Variants§
New = 1
indicates that either this is the first time that the DataReader has ever accessed samples of that instance, or else that the DataReader has accessed previous samples of the instance, but the instance has since been reborn (i.e., become not-alive and then alive again).
NotNew = 2
indicates that the DataReader has already accessed samples of the same instance and that the instance has not been reborn since
Implementations§
Trait Implementations§
Source§impl BitFlag for ViewState
impl BitFlag for ViewState
Source§fn empty() -> BitFlags<Self>
fn empty() -> BitFlags<Self>
BitFlags
with no flags set (in other words, with a value of 0). Read moreSource§fn from_bits(bits: Self::Numeric) -> Result<BitFlags<Self>, FromBitsError<Self>>
fn from_bits(bits: Self::Numeric) -> Result<BitFlags<Self>, FromBitsError<Self>>
BitFlags
if the raw value provided does not contain
any illegal flags. Read moreSource§fn from_bits_truncate(bits: Self::Numeric) -> BitFlags<Self>
fn from_bits_truncate(bits: Self::Numeric) -> BitFlags<Self>
BitFlags
from an underlying bitwise value. If any
invalid bits are set, ignore them. Read moreSource§unsafe fn from_bits_unchecked(bits: Self::Numeric) -> BitFlags<Self>
unsafe fn from_bits_unchecked(bits: Self::Numeric) -> BitFlags<Self>
BitFlags
unsafely, without checking if the bits form
a valid bit pattern for the type. Read more