pub enum PubsubFrame {
Subscribe {
channel: Vec<u8>,
count: usize,
},
Psubscribe {
pattern: Vec<u8>,
count: usize,
},
Unsubscribe {
channel: Option<Vec<u8>>,
count: usize,
},
Punsubscribe {
pattern: Option<Vec<u8>>,
count: usize,
},
Message {
channel: Vec<u8>,
payload: Vec<u8>,
},
Pmessage {
pattern: Vec<u8>,
channel: Vec<u8>,
payload: Vec<u8>,
},
}Expand description
One pub/sub event delivered to a Subscription.
Variants§
Subscribe
Ack: SUBSCRIBE succeeded on channel.
Fields
Psubscribe
Ack: PSUBSCRIBE succeeded on pattern.
Fields
Unsubscribe
Ack: UNSUBSCRIBE removed channel (or “all”, when None).
Fields
Punsubscribe
Ack: PUNSUBSCRIBE removed pattern (or “all”, when None).
Fields
Message
A PUBLISH reached a channel this subscription holds directly.
Pmessage
A PUBLISH reached a channel matching one of this subscription’s
patterns.
Trait Implementations§
Source§impl Clone for PubsubFrame
impl Clone for PubsubFrame
Source§fn clone(&self) -> PubsubFrame
fn clone(&self) -> PubsubFrame
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 PubsubFrame
impl Debug for PubsubFrame
impl Eq for PubsubFrame
Source§impl PartialEq for PubsubFrame
impl PartialEq for PubsubFrame
Source§fn eq(&self, other: &PubsubFrame) -> bool
fn eq(&self, other: &PubsubFrame) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PubsubFrame
Auto Trait Implementations§
impl Freeze for PubsubFrame
impl RefUnwindSafe for PubsubFrame
impl Send for PubsubFrame
impl Sync for PubsubFrame
impl Unpin for PubsubFrame
impl UnsafeUnpin for PubsubFrame
impl UnwindSafe for PubsubFrame
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