Skip to main content

ParticipantData

Struct ParticipantData 

Source
pub struct ParticipantData {
Show 17 fields pub guid_prefix: GuidPrefix, pub domain_id: Option<u32>, pub domain_tag: String, pub protocol_version: ProtocolVersion, pub vendor_id: VendorId, pub expects_inline_qos: bool, pub metatraffic_unicast_locators: Vec<Locator>, pub metatraffic_multicast_locators: Vec<Locator>, pub default_unicast_locators: Vec<Locator>, pub default_multicast_locators: Vec<Locator>, pub available_builtin_endpoints: BuiltinEndpointSet, pub lease_duration: Duration, pub manual_liveliness_count: Option<Count>, pub builtin_endpoint_qos: Option<u32>, pub user_data: Vec<u8>, pub entity_name: Option<String>, pub security: SecurityParameters,
}
Expand description

SPDPdiscoveredParticipantData (Table 8.78).

Fields§

§guid_prefix: GuidPrefix

The participant’s GUID prefix (sent as PID_PARTICIPANT_GUID).

§domain_id: Option<u32>

domainId. None when not sent, which means “the receiver’s domain” (Table 9.19).

§domain_tag: String

domainTag; empty by default.

§protocol_version: ProtocolVersion

protocolVersion.

§vendor_id: VendorId

vendorId.

§expects_inline_qos: bool

expectsInlineQos.

§metatraffic_unicast_locators: Vec<Locator>

metatrafficUnicastLocatorList.

§metatraffic_multicast_locators: Vec<Locator>

metatrafficMulticastLocatorList.

§default_unicast_locators: Vec<Locator>

defaultUnicastLocatorList.

§default_multicast_locators: Vec<Locator>

defaultMulticastLocatorList.

§available_builtin_endpoints: BuiltinEndpointSet

availableBuiltinEndpoints.

§lease_duration: Duration

leaseDuration; {100, 0} by default.

§manual_liveliness_count: Option<Count>

manualLivelinessCount.

§builtin_endpoint_qos: Option<u32>

builtinEndpointQos.

§user_data: Vec<u8>

user_data of the DDS participant QoS.

§entity_name: Option<String>

PID_ENTITY_NAME, if any.

§security: SecurityParameters

The parameters of DDS Security: tokens and security info.

Implementations§

Source§

impl ParticipantData

Source

pub const DEFAULT_LEASE_DURATION: Duration

The default lease duration (Table 9.19).

Source

pub fn new(guid_prefix: GuidPrefix, vendor_id: VendorId) -> Self

Data with the given prefix and vendor, and defaults for the rest.

Source

pub fn guid(&self) -> Guid

The participant’s GUID.

Source

pub fn to_parameter_list(&self, endianness: Endianness) -> ParameterList

The parameter list. Values equal to their defaults are left out, as is the separate guidPrefix (Table 9.17).

Source

pub fn to_payload(&self, endianness: Endianness) -> Vec<u8> ⓘ

The serialized payload: PL_CDR_* header and parameter list.

Source

pub fn from_parameter_list( list: &ParameterList, endianness: Endianness, ) -> Result<Self, DecodeError>

Reads the data from a parameter list.

PID_PARTICIPANT_GUID is required. Unknown parameters are skipped, except protocol-defined ones with the must-understand bit (Table 9.6), which make the whole data invalid. Vendor-specific parameters are always skipped, since this implementation has no vendor-specific parameters of its own.

Source

pub fn from_payload(bytes: &[u8]) -> Result<Self, DecodeError>

Reads the data from a serialized payload.

Trait Implementations§

Source§

impl Clone for ParticipantData

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 ParticipantData

Source§

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

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

impl Eq for ParticipantData

Source§

impl PartialEq for ParticipantData

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 ParticipantData

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.