Struct poster::UnsubscribeOpts
source · pub struct UnsubscribeOpts<'a> { /* private fields */ }
Expand description
Unsubscribe options, represented as a consuming builder. Used during unsubscribe request, translated to the UNSUBSCRIBE packet.
Implementations§
source§impl<'a> UnsubscribeOpts<'a>
impl<'a> UnsubscribeOpts<'a>
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new UnsubscribeOpts instance.
sourcepub fn topic_filter(self, val: &'a str) -> Self
pub fn topic_filter(self, val: &'a str) -> Self
Topic filter to unsubscribe from.
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 UnsubscribeOpts<'a>
impl<'a> Default for UnsubscribeOpts<'a>
source§fn default() -> UnsubscribeOpts<'a>
fn default() -> UnsubscribeOpts<'a>
Returns the “default value” for a type. Read more