#[repr(u32)]
pub enum ViewState {
New,
NotNew,
}
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
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
indicates that the DataReader has already accessed samples of the same instance and that the instance has not been reborn since
Implementations
Trait Implementations
sourceimpl RawBitFlags for ViewState
impl RawBitFlags for ViewState
impl Copy for ViewState
impl RawBitFlags for ViewState
impl StructuralPartialEq for ViewState
Auto Trait Implementations
impl RefUnwindSafe for ViewState
impl Send for ViewState
impl Sync for ViewState
impl Unpin for ViewState
impl UnwindSafe for ViewState
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more