pub struct SubscriptionConfig {
pub channel: String,
pub token: Option<Sensitive<String>>,
pub data: Option<Vec<u8>>,
pub positioned: bool,
pub recoverable: bool,
pub join_leave: bool,
pub delta: Option<String>,
pub tags_filter: Option<SubscriptionFilter>,
pub min_resubscribe_delay: Duration,
pub max_resubscribe_delay: Duration,
}Expand description
Channel subscription options and recovery settings.
Fields§
§channel: String§token: Option<Sensitive<String>>§data: Option<Vec<u8>>§positioned: bool§recoverable: bool§join_leave: bool§delta: Option<String>§min_resubscribe_delay: Duration§max_resubscribe_delay: DurationImplementations§
Source§impl SubscriptionConfig
impl SubscriptionConfig
Sourcepub fn new(channel: impl Into<String>) -> Self
pub fn new(channel: impl Into<String>) -> Self
Creates default subscription settings for channel.
Sourcepub fn data(self, data: Vec<u8>) -> Self
pub fn data(self, data: Vec<u8>) -> Self
Sets application data sent with the subscribe command.
Sourcepub fn positioned(self, enabled: bool) -> Self
pub fn positioned(self, enabled: bool) -> Self
Enables or disables stream-position information.
Sourcepub fn recoverable(self, enabled: bool) -> Self
pub fn recoverable(self, enabled: bool) -> Self
Enables or disables stream recovery after reconnecting.
Sourcepub fn join_leave(self, enabled: bool) -> Self
pub fn join_leave(self, enabled: bool) -> Self
Enables or disables join and leave publications.
Sourcepub fn delta(self, format: impl Into<String>) -> Self
pub fn delta(self, format: impl Into<String>) -> Self
Requests the named delta-compression format.
Sets the server-side publication tag filter.
Trait Implementations§
Source§impl Clone for SubscriptionConfig
impl Clone for SubscriptionConfig
Source§fn clone(&self) -> SubscriptionConfig
fn clone(&self) -> SubscriptionConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SubscriptionConfig
impl RefUnwindSafe for SubscriptionConfig
impl Send for SubscriptionConfig
impl Sync for SubscriptionConfig
impl Unpin for SubscriptionConfig
impl UnsafeUnpin for SubscriptionConfig
impl UnwindSafe for SubscriptionConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more