Skip to main content

DataWriterQos

Struct DataWriterQos 

Source
pub struct DataWriterQos {
    pub reliability: Reliability,
    pub history: History,
    pub resource_limits: ResourceLimits,
    pub writer_data_lifecycle: WriterDataLifecycle,
    pub durability: DurabilityKind,
    pub durability_service: DurabilityService,
    pub deadline: Option<Duration>,
    pub liveliness: Liveliness,
    pub user_data: Vec<u8>,
    pub data_representation: Vec<i16>,
    pub data_tags: Vec<(String, String)>,
}
Expand description

The QoS of a crate::DataWriter that can be set for now.

Fields§

§reliability: Reliability

RELIABILITY; RELIABLE by default.

§history: History

HISTORY; KEEP_LAST(1) by default. The depth is for each instance.

§resource_limits: ResourceLimits

RESOURCE_LIMITS.

§writer_data_lifecycle: WriterDataLifecycle

WRITER_DATA_LIFECYCLE.

§durability: DurabilityKind

DURABILITY; VOLATILE by default. A TRANSIENT_LOCAL writer keeps the samples its HISTORY and RESOURCE_LIMITS allow, also once they are acknowledged, and sends them to the TRANSIENT_LOCAL readers matched later; for now it keeps them also for instances it has unregistered.

A TRANSIENT writer does the same, and its samples outlive it: deleting it leaves them with the participant, which keeps what Self::durability_service allows and goes on sending them to late readers until it is deleted itself. A PERSISTENT writer also keeps them in a file, and a PERSISTENT writer of the same topic and type created later, by this program or another, takes them up again, also after a restart (see crate::ParticipantConfig::persistence_directory).

§durability_service: DurabilityService

DURABILITY_SERVICE, for a TRANSIENT or PERSISTENT writer.

§deadline: Option<Duration>

DEADLINE period (DDS 1.4, 2.2.3.7); None, infinite, by default. Each period in which a registered instance is not written counts in crate::DataWriter::offered_deadline_missed_status; a disposed instance is not counted until it is written again.

§liveliness: Liveliness

LIVELINESS (DDS 1.4, 2.2.3.11). The participant asserts AUTOMATIC writers; a MANUAL_BY_PARTICIPANT or MANUAL_BY_TOPIC writer is asserted by writing or by assert_liveliness, and is lost (crate::DataWriter::liveliness_lost_status) when its lease passes without that.

§user_data: Vec<u8>

USER_DATA (DDS 1.4, 2.2.3.1): octets the writer announces to the other participants, for the application. Empty by default. ROS 2 reads typehash=...; here.

§data_representation: Vec<i16>

DATA_REPRESENTATION (DDS-XTypes 1.3, 7.6.3.1): the writer serializes its samples in the first (data_representation::XCDR or data_representation::XCDR2) and offers it to readers. Empty, the default, is XCDR, which every reader accepts; it is then not announced.

§data_tags: Vec<(String, String)>

DATA_TAGS (DataTagQosPolicy, DDS Security 1.2, 7.2.5 and 9.7): (name, value) tags of every sample the writer writes, announced with it. With DDS Security, the permissions must allow publishing with them (10.4.1.5.3.4.1.5). Empty by default.

Trait Implementations§

Source§

impl Clone for DataWriterQos

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DataWriterQos

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for DataWriterQos

Source§

fn default() -> Self

The DDS defaults: RELIABLE, KEEP_LAST(1), no limits, VOLATILE.

Source§

impl Eq for DataWriterQos

Source§

impl PartialEq for DataWriterQos

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for DataWriterQos

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.