#[non_exhaustive]pub enum PubsubEvent {
Subscribe {
channel: Vec<u8>,
count: i64,
},
Psubscribe {
pattern: Vec<u8>,
count: i64,
},
Unsubscribe {
channel: Option<Vec<u8>>,
count: i64,
},
Punsubscribe {
pattern: Option<Vec<u8>>,
count: i64,
},
Message {
channel: Vec<u8>,
payload: Vec<u8>,
},
Pmessage {
pattern: Vec<u8>,
channel: Vec<u8>,
payload: Vec<u8>,
},
}Expand description
One pubsub frame received over the wire.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Subscribe
SUBSCRIBE ack per channel.
Fields
Psubscribe
PSUBSCRIBE ack per pattern.
Fields
Unsubscribe
UNSUBSCRIBE ack.
Fields
Punsubscribe
PUNSUBSCRIBE ack.
Fields
Message
Plain PUBLISH delivery on a subscribed channel.
Pmessage
Pattern-match delivery.
Trait Implementations§
Source§impl Clone for PubsubEvent
impl Clone for PubsubEvent
Source§fn clone(&self) -> PubsubEvent
fn clone(&self) -> PubsubEvent
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 PubsubEvent
impl Debug for PubsubEvent
impl Eq for PubsubEvent
Source§impl PartialEq for PubsubEvent
impl PartialEq for PubsubEvent
Source§fn eq(&self, other: &PubsubEvent) -> bool
fn eq(&self, other: &PubsubEvent) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PubsubEvent
Auto Trait Implementations§
impl Freeze for PubsubEvent
impl RefUnwindSafe for PubsubEvent
impl Send for PubsubEvent
impl Sync for PubsubEvent
impl Unpin for PubsubEvent
impl UnsafeUnpin for PubsubEvent
impl UnwindSafe for PubsubEvent
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