Struct poster::SubscribeOpts
source · pub struct SubscribeOpts<'a> { /* private fields */ }Expand description
Subscription options, represented as a consuming builder. Used during subscription request, translated to the SUBSCRIBE packet. Note that multiple topic filters may be supplied.
Implementations§
source§impl<'a> SubscribeOpts<'a>
impl<'a> SubscribeOpts<'a>
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new SubscribeOpts instance.
sourcepub fn subscription(self, topic: &'a str, opts: SubscriptionOptions) -> Self
pub fn subscription(self, topic: &'a str, opts: SubscriptionOptions) -> Self
Sets a new subscription with the given topic filter and options. Multiple subscriptions may be created.
sourcepub fn user_property(self, (key, val): (&'a str, &'a str)) -> Self
pub fn user_property(self, (key, val): (&'a str, &'a str)) -> Self
Sets user properties as key-value pairs. Multiple user properties may be set.
Trait Implementations§
source§impl<'a> Default for SubscribeOpts<'a>
impl<'a> Default for SubscribeOpts<'a>
source§fn default() -> SubscribeOpts<'a>
fn default() -> SubscribeOpts<'a>
Returns the “default value” for a type. Read more