pub struct ParticipantBuilder<'domain, 'qos> { /* private fields */ }Expand description
Builder for Participant (accessible via Participant::builder).
Implementations§
Source§impl<'d, 'q> ParticipantBuilder<'d, 'q>
impl<'d, 'q> ParticipantBuilder<'d, 'q>
Sourcepub const fn new(domain: &'d Domain) -> Self
pub const fn new(domain: &'d Domain) -> Self
Creates a new ParticipantBuilder for the given
Domain.
§Examples
use cyclonedds::Domain;
use cyclonedds::builder::ParticipantBuilder;
let domain = Domain::default();
let participant_builder = ParticipantBuilder::new(&domain);Sourcepub const fn with_qos(self, qos: &'q QoS) -> Self
pub const fn with_qos(self, qos: &'q QoS) -> Self
Sets the QoS for this participant builder.
§Examples
use cyclonedds::builder::ParticipantBuilder;
use cyclonedds::qos::policy;
use cyclonedds::{Duration, QoS};
let qos = QoS::new().with_reliability(policy::Reliability::Reliable {
max_blocking_time: Duration::from_millis(100),
});
let participant_builder = ParticipantBuilder::new(&domain).with_qos(&qos);Sourcepub fn with_listener<L>(self, listener: L) -> Self
pub fn with_listener<L>(self, listener: L) -> Self
Sourcepub fn build(self) -> Result<Participant<'d>>
pub fn build(self) -> Result<Participant<'d>>
Builds the Participant.
§Errors
Returns an Error if the participant failed to create.
§Examples
use cyclonedds::builder::ParticipantBuilder;
use cyclonedds::qos::policy::Durability;
use cyclonedds::{Domain, QoS};
let domain = Domain::default();
let qos = QoS::new().with_durability(Durability::TransientLocal);
let participant = ParticipantBuilder::new(&domain).with_qos(&qos).build()?;
Trait Implementations§
Auto Trait Implementations§
impl<'domain, 'qos> !Send for ParticipantBuilder<'domain, 'qos>
impl<'domain, 'qos> !Sync for ParticipantBuilder<'domain, 'qos>
impl<'domain, 'qos> Freeze for ParticipantBuilder<'domain, 'qos>
impl<'domain, 'qos> RefUnwindSafe for ParticipantBuilder<'domain, 'qos>
impl<'domain, 'qos> Unpin for ParticipantBuilder<'domain, 'qos>
impl<'domain, 'qos> UnsafeUnpin for ParticipantBuilder<'domain, 'qos>
impl<'domain, 'qos> UnwindSafe for ParticipantBuilder<'domain, 'qos>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more