Struct hive_pubsub::backend::redis::RedisPubSub [−][src]
pub struct RedisPubSub<'a, K: Clone + Eq + Hash, V: Clone + Eq + Hash + DeserializeOwned + Serialize, D: DeserializeOwned + Serialize> {
pub hive: Hive<K, V, D>,
// some fields omitted
}
This is supported on crate feature
redis-backend
only.Expand description
Redis pubsub
Fields
hive: Hive<K, V, D>
Implementations
impl<'a, K: Clone + Eq + Hash, V: Clone + Eq + Hash + DeserializeOwned + Serialize + From<String>, D: DeserializeOwned + Serialize> RedisPubSub<'a, K, V, D>
impl<'a, K: Clone + Eq + Hash, V: Clone + Eq + Hash + DeserializeOwned + Serialize + From<String>, D: DeserializeOwned + Serialize> RedisPubSub<'a, K, V, D>
pub fn new<F: 'static + Fn(Vec<K>, D) + Send>(
callback: F,
pool: &'a Pool<RedisConnectionManager>,
pubsub: Arc<Mutex<RedisPS>>
) -> RedisPubSub<'a, K, V, D>
Set the id of this source.
Used for testing.
Trait Implementations
impl<'a, K: Clone + Eq + Hash, V: Clone + Eq + Hash + DeserializeOwned + Serialize, D: Clone + DeserializeOwned + Serialize> Clone for RedisPubSub<'a, K, V, D>
impl<'a, K: Clone + Eq + Hash, V: Clone + Eq + Hash + DeserializeOwned + Serialize, D: Clone + DeserializeOwned + Serialize> Clone for RedisPubSub<'a, K, V, D>
impl<'a, K: Clone + Eq + Hash, V: Clone + Eq + Hash + DeserializeOwned + Serialize, D: DeserializeOwned + Serialize> PubSub<K, V, D> for RedisPubSub<'a, K, V, D>
impl<'a, K: Clone + Eq + Hash, V: Clone + Eq + Hash + DeserializeOwned + Serialize, D: DeserializeOwned + Serialize> PubSub<K, V, D> for RedisPubSub<'a, K, V, D>
Add several subscriptions to a topic.
Remove a subscription to a topic.
Remove several subscriptions to a topic.
Auto Trait Implementations
impl<'a, K, V, D> !RefUnwindSafe for RedisPubSub<'a, K, V, D>
impl<'a, K, V, D> Send for RedisPubSub<'a, K, V, D> where
K: Send,
V: Send,
impl<'a, K, V, D> Sync for RedisPubSub<'a, K, V, D> where
K: Send,
V: Send,
impl<'a, K, V, D> Unpin for RedisPubSub<'a, K, V, D>
impl<'a, K, V, D> !UnwindSafe for RedisPubSub<'a, K, V, D>
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more