#[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 moresource§impl RawBitFlags for ViewState
impl RawBitFlags for ViewState
source§const EMPTY: Self::Numeric = {transmute(0x00000000): <dds::sampleinfo::ViewState as enumflags2::_internal::RawBitFlags>::Numeric}
const EMPTY: Self::Numeric = {transmute(0x00000000): <dds::sampleinfo::ViewState as enumflags2::_internal::RawBitFlags>::Numeric}
source§const DEFAULT: Self::Numeric = {transmute(0x00000000): <dds::sampleinfo::ViewState as enumflags2::_internal::RawBitFlags>::Numeric}
const DEFAULT: Self::Numeric = {transmute(0x00000000): <dds::sampleinfo::ViewState as enumflags2::_internal::RawBitFlags>::Numeric}
source§const ALL_BITS: Self::Numeric = {transmute(0x00000003): <dds::sampleinfo::ViewState as enumflags2::_internal::RawBitFlags>::Numeric}
const ALL_BITS: Self::Numeric = {transmute(0x00000003): <dds::sampleinfo::ViewState as enumflags2::_internal::RawBitFlags>::Numeric}
source§const BITFLAGS_TYPE_NAME: &'static str = "BitFlags<ViewState>"
const BITFLAGS_TYPE_NAME: &'static str = "BitFlags<ViewState>"
impl Copy for ViewState
impl Eq for ViewState
impl StructuralPartialEq for ViewState
Auto Trait Implementations§
impl Freeze for ViewState
impl RefUnwindSafe for ViewState
impl Send for ViewState
impl Sync for ViewState
impl Unpin for ViewState
impl UnwindSafe for ViewState
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)