pub struct RedisObjects { /* private fields */ }
Expand description
Handle for a pool of connections to a redis server.
Implementations§
Source§impl RedisObjects
impl RedisObjects
Sourcepub fn open_host(
host: &str,
port: u16,
db: i64,
) -> Result<Arc<Self>, ErrorTypes>
pub fn open_host( host: &str, port: u16, db: i64, ) -> Result<Arc<Self>, ErrorTypes>
Open given more limited connection info
Sourcepub fn open_host_native_tls(
host: &str,
port: u16,
db: i64,
) -> Result<Arc<Self>, ErrorTypes>
pub fn open_host_native_tls( host: &str, port: u16, db: i64, ) -> Result<Arc<Self>, ErrorTypes>
Open a connection using the local tls configuration
Sourcepub fn open(config: ConnectionInfo) -> Result<Arc<Self>, ErrorTypes>
pub fn open(config: ConnectionInfo) -> Result<Arc<Self>, ErrorTypes>
Open a connection pool
Sourcepub fn priority_queue<T: Serialize + DeserializeOwned>(
self: &Arc<Self>,
name: String,
) -> PriorityQueue<T>
pub fn priority_queue<T: Serialize + DeserializeOwned>( self: &Arc<Self>, name: String, ) -> PriorityQueue<T>
Open a priority queue under the given key
Sourcepub fn queue<T: Serialize + DeserializeOwned>(
self: &Arc<Self>,
name: String,
ttl: Option<Duration>,
) -> Queue<T>
pub fn queue<T: Serialize + DeserializeOwned>( self: &Arc<Self>, name: String, ttl: Option<Duration>, ) -> Queue<T>
Open a FIFO queue under the given key
Sourcepub fn multiqueue<T: Serialize + DeserializeOwned>(
self: &Arc<Self>,
prefix: String,
) -> MultiQueue<T>
pub fn multiqueue<T: Serialize + DeserializeOwned>( self: &Arc<Self>, prefix: String, ) -> MultiQueue<T>
an object that represents a set of queues with a common prefix
Sourcepub fn hashmap<T: Serialize + DeserializeOwned>(
self: &Arc<Self>,
name: String,
ttl: Option<Duration>,
) -> Hashmap<T>
pub fn hashmap<T: Serialize + DeserializeOwned>( self: &Arc<Self>, name: String, ttl: Option<Duration>, ) -> Hashmap<T>
Open a hash map under the given key
Sourcepub fn publisher(self: &Arc<Self>, channel: String) -> Publisher
pub fn publisher(self: &Arc<Self>, channel: String) -> Publisher
Create a sink to publish messages to a named channel
Sourcepub async fn publish(
&self,
channel: &str,
data: &[u8],
) -> Result<u32, ErrorTypes>
pub async fn publish( &self, channel: &str, data: &[u8], ) -> Result<u32, ErrorTypes>
Write a message directly to the channel given
Sourcepub async fn publish_json<T: Serialize>(
&self,
channel: &str,
value: &T,
) -> Result<u32, ErrorTypes>
pub async fn publish_json<T: Serialize>( &self, channel: &str, value: &T, ) -> Result<u32, ErrorTypes>
Write a json message directly to the channel given
Sourcepub fn auto_exporting_metrics<T: MetricMessage>(
self: &Arc<Self>,
name: String,
counter_type: String,
) -> AutoExportingMetricsBuilder<T>
pub fn auto_exporting_metrics<T: MetricMessage>( self: &Arc<Self>, name: String, counter_type: String, ) -> AutoExportingMetricsBuilder<T>
Start building a metrics exporter
Sourcepub fn pubsub_json_listener<T: DeserializeOwned + Send + 'static>(
self: &Arc<Self>,
) -> JsonListenerBuilder<T>
pub fn pubsub_json_listener<T: DeserializeOwned + Send + 'static>( self: &Arc<Self>, ) -> JsonListenerBuilder<T>
Start building a json listener that produces a stream of events
Sourcepub fn subscribe_json<T: DeserializeOwned + Send + 'static>(
self: &Arc<Self>,
channel: String,
) -> Receiver<Option<T>>
pub fn subscribe_json<T: DeserializeOwned + Send + 'static>( self: &Arc<Self>, channel: String, ) -> Receiver<Option<T>>
Build a json listener that produces a stream of events using the default configuration
Sourcepub fn pubsub_listener(self: &Arc<Self>) -> ListenerBuilder
pub fn pubsub_listener(self: &Arc<Self>) -> ListenerBuilder
Start building a raw data listener that produces a stream of events
Sourcepub fn subscribe(self: &Arc<Self>, channel: String) -> Receiver<Option<Msg>>
pub fn subscribe(self: &Arc<Self>, channel: String) -> Receiver<Option<Msg>>
Build a raw data listener that produces a stream of events using the default configuration
Sourcepub fn user_quota_tracker(self: &Arc<Self>, prefix: String) -> UserQuotaTracker
pub fn user_quota_tracker(self: &Arc<Self>, prefix: String) -> UserQuotaTracker
Open an interface for tracking user quotas on redis
Sourcepub fn set<T: Serialize + DeserializeOwned>(
self: &Arc<Self>,
name: String,
) -> Set<T>
pub fn set<T: Serialize + DeserializeOwned>( self: &Arc<Self>, name: String, ) -> Set<T>
Open a set of values
Sourcepub fn expiring_set<T: Serialize + DeserializeOwned>(
self: &Arc<Self>,
name: String,
ttl: Option<Duration>,
) -> Set<T>
pub fn expiring_set<T: Serialize + DeserializeOwned>( self: &Arc<Self>, name: String, ttl: Option<Duration>, ) -> Set<T>
Open a set of values with an expiration policy
Sourcepub async fn wipe(&self) -> Result<(), ErrorTypes>
pub async fn wipe(&self) -> Result<(), ErrorTypes>
Erase all data on the redis server