pub struct PublishConfig {
pub reliability: Reliability,
pub on_failure: OnFailure,
pub max_inflight: usize,
}Expand description
Builder-style configuration for a ChannelPublisher.
Fields§
§reliability: ReliabilityPer-peer reliability mode (applies to each unicast leg of the fan-out, not to the fan-out as a whole).
on_failure: OnFailureFailure policy.
max_inflight: usizeMaximum concurrent per-peer sends. Defaults to 32. Larger rosters can bump this; smaller numbers are safer under socket contention.
Implementations§
Source§impl PublishConfig
impl PublishConfig
Sourcepub fn new() -> PublishConfig
pub fn new() -> PublishConfig
New builder-style config with defaults.
Sourcepub fn with_reliability(self, reliability: Reliability) -> PublishConfig
pub fn with_reliability(self, reliability: Reliability) -> PublishConfig
Set per-peer reliability.
Sourcepub fn with_on_failure(self, on_failure: OnFailure) -> PublishConfig
pub fn with_on_failure(self, on_failure: OnFailure) -> PublishConfig
Set the failure policy.
Sourcepub fn with_max_inflight(self, n: usize) -> PublishConfig
pub fn with_max_inflight(self, n: usize) -> PublishConfig
Set the max concurrent per-peer sends. Clamped to >= 1.
Trait Implementations§
Source§impl Clone for PublishConfig
impl Clone for PublishConfig
Source§fn clone(&self) -> PublishConfig
fn clone(&self) -> PublishConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PublishConfig
impl Debug for PublishConfig
Source§impl Default for PublishConfig
impl Default for PublishConfig
Source§fn default() -> PublishConfig
fn default() -> PublishConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PublishConfig
impl RefUnwindSafe for PublishConfig
impl Send for PublishConfig
impl Sync for PublishConfig
impl Unpin for PublishConfig
impl UnsafeUnpin for PublishConfig
impl UnwindSafe for PublishConfig
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