pub trait Entity {
type Qos: Clone;
// Required methods
fn get_qos(&self) -> Self::Qos;
fn set_qos(&self, qos: Self::Qos) -> Result<()>;
fn enable(&self) -> Result<()>;
fn entity_state(&self) -> Arc<EntityState> ⓘ;
// Provided methods
fn is_enabled(&self) -> bool { ... }
fn get_status_condition(&self) -> StatusCondition { ... }
fn get_status_changes(&self) -> StatusMask { ... }
fn get_instance_handle(&self) -> InstanceHandle { ... }
}Expand description
Entity-Trait — gemeinsame Lifecycle-API der 6 Entity-Typen (DCPS §2.2.2.1).
Nicht-blocking, Send+Sync — alle Methoden delegieren auf
Arc<EntityState>.
Required Associated Types§
Required Methods§
Sourcefn set_qos(&self, qos: Self::Qos) -> Result<()>
fn set_qos(&self, qos: Self::Qos) -> Result<()>
Aendert QoS. Pre-enable: alles erlaubt. Post-enable: nur
Felder mit “Changeable=YES” — sonst ImmutablePolicy-Error.
Spec §2.2.2.1.2 set_qos.
§Errors
DdsError::ImmutablePolicywenn ein immutables Feld nachenable()geaendert werden soll.DdsError::InconsistentPolicywenn die neue QoS-Kombination inkonsistent ist.
Sourcefn enable(&self) -> Result<()>
fn enable(&self) -> Result<()>
Enabled die Entity (idempotent). Spec §2.2.2.1.4 enable.
§Errors
DdsError::PreconditionNotMet wenn das Parent-Entity nicht
enabled ist (Spec: Children koennen nicht vor Parent enabled
werden — ausser Factory selbst).
Sourcefn entity_state(&self) -> Arc<EntityState> ⓘ
fn entity_state(&self) -> Arc<EntityState> ⓘ
Interner Accessor — jede Impl liefert ihren Arc<EntityState>.
Provided Methods§
Sourcefn is_enabled(&self) -> bool
fn is_enabled(&self) -> bool
True wenn die Entity bereits enabled ist.
Sourcefn get_status_condition(&self) -> StatusCondition
fn get_status_condition(&self) -> StatusCondition
StatusCondition dieser Entity.
Spec §2.2.2.1.6 get_status_condition.
Sourcefn get_status_changes(&self) -> StatusMask
fn get_status_changes(&self) -> StatusMask
Bitmask der Status-Kinds, die seit letztem Read geaendert haben.
Spec §2.2.2.1.5 get_status_changes.
Sourcefn get_instance_handle(&self) -> InstanceHandle
fn get_instance_handle(&self) -> InstanceHandle
Lokaler 64-Bit-Identifier. Spec §2.2.2.1.7 get_instance_handle.
Implementors§
Source§impl Entity for DomainParticipant
impl Entity for DomainParticipant
type Qos = DomainParticipantQos
Source§impl Entity for Subscriber
Available on crate feature std only.
impl Entity for Subscriber
std only.type Qos = SubscriberQos
Source§impl<T: DdsType> Entity for DataWriter<T>
Available on crate feature std only.
impl<T: DdsType> Entity for DataWriter<T>
std only.type Qos = DataWriterQos
Source§impl<T: DdsType> Entity for DataReader<T>
Available on crate feature std only.
impl<T: DdsType> Entity for DataReader<T>
std only.