ProductPromotion
Logo

Rust

made by https://0x3d.site

GitHub - aembke/fred.rs: An async Redis client for Rust.
An async Redis client for Rust. Contribute to aembke/fred.rs development by creating an account on GitHub.
Visit Site

GitHub - aembke/fred.rs: An async Redis client for Rust.

GitHub - aembke/fred.rs: An async Redis client for Rust.

Fred

License License CircleCI Crates.io API docs

An async client for Redis and Valkey

Example

use fred::prelude::*;

#[tokio::main]
async fn main() -> Result<(), RedisError> {
  let client = RedisClient::default();
  client.init().await?;

  // convert responses to many common Rust types
  let foo: Option<String> = client.get("foo").await?;
  assert!(foo.is_none());

  client.set("foo", "bar", None, None, false).await?;
  // or use turbofish to declare response types
  println!("Foo: {:?}", client.get::<String, _>("foo").await?);

  client.quit().await?;
  Ok(())
}

See the examples for more.

Features

See the build features for more information.

Client Features

Name Default Description
transactions x Enable a Transaction interface.
enable-native-tls Enable TLS support via native-tls.
enable-rustls Enable TLS support via rustls with the default crypto backend features.
enable-rustls-ring Enable TLS support via rustls and the ring crypto backend.
vendored-openssl Enable the native-tls/vendored feature.
metrics Enable the metrics interface to track overall latency, network latency, and request/response sizes.
full-tracing Enable full tracing support. This can emit a lot of data.
partial-tracing Enable partial tracing support, only emitting traces for top level commands and network latency.
blocking-encoding Use a blocking task for encoding or decoding frames. This can be useful for clients that send or receive large payloads, but requires a multi-thread Tokio runtime.
custom-reconnect-errors Enable an interface for callers to customize the types of errors that should automatically trigger reconnection logic.
monitor Enable an interface for running the MONITOR command.
sentinel-client Enable an interface for communicating directly with Sentinel nodes. This is not necessary to use normal Redis clients behind a sentinel layer.
sentinel-auth Enable an interface for using different authentication credentials to sentinel nodes.
subscriber-client Enable a subscriber client interface that manages channel subscription state for callers.
serde-json Enable an interface to automatically convert Redis types to JSON via serde-json.
mocks Enable a mocking layer interface that can be used to intercept and process commands in tests.
dns Enable an interface that allows callers to override the DNS lookup logic.
replicas Enable an interface that routes commands to replica nodes.
default-nil-types Enable a looser parsing interface for nil values.
sha-1 Enable an interface for hashing Lua scripts.
unix-sockets Enable Unix socket support.
glommio Enable experimental Glommio support. See the Glommio Runtime docs for more information. When enabled the client will no longer work with Tokio runtimes.
credential-provider Enable an interface that can dynamically load auth credentials at runtime.

Interface Features

The command interfaces have many functions and compile times can add up quickly. Interface features begin with i- and control which public interfaces are built.

Name Default Description
i-all Enable the interfaces included with a basic Redis or Valkey installation. This does not include i-redis-stack features.
i-std x Enable the common data structure interfaces (lists, sets, streams, keys, etc).
i-acl Enable the ACL command interface.
i-client Enable the CLIENT command interface.
i-cluster Enable the CLUSTER command interface.
i-config Enable the CONFIG command interface.
i-geo Enable the GEO command interface.
i-hashes Enable the hashes (HGET, etc) command interface.
i-hyperloglog Enable the hyperloglog command interface.
i-keys Enable the main keys (GET, SET, etc) command interface.
i-lists Enable the lists (LPUSH, etc) command interface.
i-scripts Enable the scripting command interfaces.
i-memory Enable the MEMORY command interfaces.
i-pubsub Enable the publish-subscribe command interfaces.
i-server Enable the server control (SHUTDOWN, BGSAVE, etc) interfaces.
i-sets Enable the sets (SADD, etc) interface.
i-sorted-sets Enable the sorted sets (ZADD, etc) interface.
i-slowlog Enable the SLOWLOG interface.
i-streams Enable the streams (XADD, etc) interface.
i-tracking Enable a client tracking interface.
i-time-series Enable a Redis Timeseries interface.
i-redis-json Enable a RedisJSON interface.
i-redisearch Enable a RediSearch interface.
i-redis-stack Enable the Redis Stack interfaces (i-redis-json, i-time-series, etc).

If a specific high level command function is not supported callers can use the custom function as a workaround until the higher level interface is added. See the custom example for more info.

Debugging Features

Name Default Description
debug-ids Enable a global counter used to differentiate commands in logs.
network-logs Enable additional TRACE logs for all frames on all sockets.

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory