Skip to main content

PrimitiveOptions

Struct PrimitiveOptions 

Source
pub struct PrimitiveOptions<'a> {
    pub name: &'a str,
    pub history: Option<QoSHistoryPolicy>,
    pub depth: Option<u32>,
    pub reliability: Option<QoSReliabilityPolicy>,
    pub durability: Option<QoSDurabilityPolicy>,
    pub deadline_ms: Option<u32>,
    pub lifespan_ms: Option<u32>,
    pub liveliness: Option<QoSLivelinessPolicy>,
    pub liveliness_lease_ms: Option<u32>,
    pub avoid_ros_namespace_conventions: Option<bool>,
}
Expand description

phase-515 R1 – rclrs’s per-entity options and IntoPrimitiveOptions. rclrs’s PrimitiveOptions: an entity’s name plus the QoS policies its create site stated.

ADOPT-BOUNDED against rclrs: the duration-valued policies hold whole milliseconds (the unit QoSProfile records, 0 = infinite) where rclrs holds a QoSDuration enum, so deadline / lifespan / liveliness_lease take a core::time::Duration and the infinite case is no_deadline / infinite_lifespan. History and depth are two fields because QoSProfile keeps them apart.

Fields§

§name: &'a str

The entity’s (source) name: topic or service.

§history: Option<QoSHistoryPolicy>

History policy, if stated.

§depth: Option<u32>

Queue depth, if stated (keep_last(n) states both).

§reliability: Option<QoSReliabilityPolicy>

Reliability policy, if stated.

§durability: Option<QoSDurabilityPolicy>

Durability policy, if stated.

§deadline_ms: Option<u32>

Deadline in milliseconds (0 = none), if stated.

§lifespan_ms: Option<u32>

Lifespan in milliseconds (0 = infinite), if stated.

§liveliness: Option<QoSLivelinessPolicy>

Liveliness policy, if stated.

§liveliness_lease_ms: Option<u32>

Liveliness lease in milliseconds (0 = infinite), if stated.

§avoid_ros_namespace_conventions: Option<bool>

Skip the ROS topic-name prefix, if stated.

Implementations§

Source§

impl<'a> PrimitiveOptions<'a>

Source

pub const fn new(name: &'a str) -> Self

Options naming name and stating no policy.

Source

pub fn apply_to(&self, qos: &mut QoSProfile)

rclrs’s apply_to: overwrite each policy this value states, leave the rest of qos as it is.

Source

pub fn resolve(&self, default: QoSProfile) -> QoSProfile

default with this value’s stated policies applied — what a create site resolves.

Trait Implementations§

Source§

impl<'a> Clone for PrimitiveOptions<'a>

Source§

fn clone(&self) -> PrimitiveOptions<'a>

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<'a> Copy for PrimitiveOptions<'a>

Source§

impl<'a> Debug for PrimitiveOptions<'a>

Source§

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

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

impl<'a> Eq for PrimitiveOptions<'a>

Source§

impl<'a> IntoPrimitiveOptions<'a> for PrimitiveOptions<'a>

Source§

fn into_primitive_options(self) -> PrimitiveOptions<'a>

Convert to the full options value.
Source§

fn qos(self, profile: QoSProfile) -> PrimitiveOptions<'a>

State every policy of profile.
Source§

fn topics_qos(self) -> PrimitiveOptions<'a>

Source§

fn sensor_data_qos(self) -> PrimitiveOptions<'a>

Source§

fn services_qos(self) -> PrimitiveOptions<'a>

Source§

fn system_qos(self) -> PrimitiveOptions<'a>

Source§

fn history(self, history: QoSHistoryPolicy) -> PrimitiveOptions<'a>

State the history policy.
Source§

fn keep_last(self, depth: u32) -> PrimitiveOptions<'a>

Keep the last depth samples.
Source§

fn keep_all(self) -> PrimitiveOptions<'a>

Keep every sample.
Source§

fn reliability(self, reliability: QoSReliabilityPolicy) -> PrimitiveOptions<'a>

State the reliability policy.
Source§

fn reliable(self) -> PrimitiveOptions<'a>

Reliable delivery.
Source§

fn best_effort(self) -> PrimitiveOptions<'a>

Best-effort delivery.
Source§

fn durability(self, durability: QoSDurabilityPolicy) -> PrimitiveOptions<'a>

State the durability policy.
Source§

fn volatile(self) -> PrimitiveOptions<'a>

Volatile durability.
Source§

fn transient_local(self) -> PrimitiveOptions<'a>

Transient-local durability.
Source§

fn lifespan(self, lifespan: Duration) -> PrimitiveOptions<'a>

The lifespan. ADOPT-BOUNDED: a Duration, not rclrs’s QoSDuration.
Source§

fn lifespan_duration(self, duration: Duration) -> PrimitiveOptions<'a>

rclrs’s lifespan_duration, the same as lifespan.
Source§

fn infinite_lifespan(self) -> PrimitiveOptions<'a>

Samples never expire.
Source§

fn deadline(self, deadline: Duration) -> PrimitiveOptions<'a>

The deadline. ADOPT-BOUNDED: a Duration, not rclrs’s QoSDuration.
Source§

fn deadline_duration(self, duration: Duration) -> PrimitiveOptions<'a>

rclrs’s deadline_duration, the same as deadline.
Source§

fn no_deadline(self) -> PrimitiveOptions<'a>

No deadline.
Source§

fn liveliness(self, liveliness: QoSLivelinessPolicy) -> PrimitiveOptions<'a>

State the liveliness policy.
Source§

fn liveliness_automatic(self) -> PrimitiveOptions<'a>

Automatic liveliness.
Source§

fn liveliness_manual(self) -> PrimitiveOptions<'a>

Manual-by-topic liveliness, rclrs’s one manual kind.
Source§

fn liveliness_lease(self, lease: Duration) -> PrimitiveOptions<'a>

The liveliness lease. ADOPT-BOUNDED: a Duration, not rclrs’s QoSDuration.
Source§

fn liveliness_lease_duration(self, duration: Duration) -> PrimitiveOptions<'a>

rclrs’s liveliness_lease_duration, the same as liveliness_lease.
Source§

fn avoid_ros_namespace_conventions(self) -> PrimitiveOptions<'a>

Skip the ROS topic-name prefix.
Source§

impl<'a> PartialEq for PrimitiveOptions<'a>

Source§

fn eq(&self, other: &PrimitiveOptions<'a>) -> bool

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

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

Inequality operator !=. Read more
Source§

impl<'a> StructuralPartialEq for PrimitiveOptions<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for PrimitiveOptions<'a>

§

impl<'a> RefUnwindSafe for PrimitiveOptions<'a>

§

impl<'a> Send for PrimitiveOptions<'a>

§

impl<'a> Sync for PrimitiveOptions<'a>

§

impl<'a> Unpin for PrimitiveOptions<'a>

§

impl<'a> UnsafeUnpin for PrimitiveOptions<'a>

§

impl<'a> UnwindSafe for PrimitiveOptions<'a>

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.