├── docs ├── api │ ├── .lock │ ├── crates.js │ ├── simple_redis │ │ ├── client │ │ │ ├── sidebar-items.js │ │ │ ├── index.html │ │ │ └── fn.create.html │ │ ├── sidebar-items.js │ │ ├── types │ │ │ ├── sidebar-items.js │ │ │ ├── type.Message.html │ │ │ ├── type.RedisBoolResult.html │ │ │ ├── type.RedisEmptyResult.html │ │ │ ├── type.RedisResult.html │ │ │ ├── type.RedisStringResult.html │ │ │ └── index.html │ │ ├── type.Message.html │ │ ├── all.html │ │ ├── type.RedisError.html │ │ ├── type.RedisResult.html │ │ ├── fn.create.html │ │ └── type.Interrupts.html │ ├── static.files │ │ ├── favicon-32x32-6580c154.png │ │ ├── FiraMono-Medium-86f75c8c.woff2 │ │ ├── FiraMono-Regular-87c26294.woff2 │ │ ├── FiraSans-Italic-81dc35de.woff2 │ │ ├── FiraSans-Medium-e1aa3f0a.woff2 │ │ ├── FiraSans-Regular-0fe48ade.woff2 │ │ ├── SourceSerif4-It-ca3b17ed.ttf.woff2 │ │ ├── FiraSans-MediumItalic-ccf7e434.woff2 │ │ ├── NanumBarunGothic-13b3dcba.ttf.woff2 │ │ ├── SourceCodePro-It-fc8b9304.ttf.woff2 │ │ ├── SourceSerif4-Bold-6d4fd4c0.ttf.woff2 │ │ ├── SourceSerif4-Regular-6b053e98.ttf.woff2 │ │ ├── SourceCodePro-Regular-8badfe75.ttf.woff2 │ │ ├── SourceCodePro-Semibold-aa29a496.ttf.woff2 │ │ ├── SourceSerif4-Semibold-457a13ac.ttf.woff2 │ │ ├── LICENSE-MIT-23f18e03.txt │ │ ├── normalize-9960930a.css │ │ ├── scrape-examples-5e967b76.js │ │ ├── COPYRIGHT-7fb11f4e.txt │ │ ├── rust-logo-9a9549ea.svg │ │ ├── src-script-813739b1.js │ │ ├── favicon-044be391.svg │ │ ├── FiraSans-LICENSE-05ab6dbd.txt │ │ ├── SourceCodePro-LICENSE-67f54ca7.txt │ │ ├── SourceSerif4-LICENSE-a2cfd9d5.md │ │ ├── NanumBarunGothic-LICENSE-a37d393b.txt │ │ ├── storage-68b7e25d.js │ │ ├── settings-5514c975.js │ │ └── noscript-32bb7600.css │ ├── src-files.js │ ├── type.impl │ │ └── simple_redis │ │ │ └── types │ │ │ ├── type.Message.js │ │ │ ├── type.RedisResult.js │ │ │ ├── struct.Interrupts.js │ │ │ └── enum.RedisError.js │ ├── trait.impl │ │ ├── simple_redis │ │ │ └── types │ │ │ │ └── trait.RedisArg.js │ │ └── core │ │ │ ├── error │ │ │ └── trait.Error.js │ │ │ ├── fmt │ │ │ ├── trait.Display.js │ │ │ └── trait.Debug.js │ │ │ ├── clone │ │ │ └── trait.Clone.js │ │ │ ├── marker │ │ │ ├── trait.Copy.js │ │ │ ├── trait.UnsafeUnpin.js │ │ │ ├── trait.Send.js │ │ │ ├── trait.Sync.js │ │ │ ├── trait.Unpin.js │ │ │ └── trait.Freeze.js │ │ │ ├── default │ │ │ └── trait.Default.js │ │ │ └── panic │ │ │ └── unwind_safe │ │ │ ├── trait.UnwindSafe.js │ │ │ └── trait.RefUnwindSafe.js │ ├── settings.html │ ├── help.html │ ├── search.desc │ │ └── simple_redis │ │ │ └── simple_redis-desc-0-.js │ └── search-index.js └── index.html ├── .gitattributes ├── .rusty-hook.toml ├── .gitignore ├── src ├── connection_test.rs ├── subscriber_test.rs ├── lib_test.rs ├── types_test.rs ├── commands_test.rs ├── client_test.rs ├── connection.rs ├── types.rs └── subscriber.rs ├── .github ├── dependabot.yml ├── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md ├── workflows │ └── ci.yml └── CONTRIBUTING.md ├── .editorconfig ├── benches └── bench_commands.rs ├── examples ├── open_close_connection.rs ├── set_get.rs ├── subscription_flow.rs ├── init_and_simple_operations.rs └── pubsub.rs ├── Makefile.toml ├── Cargo.toml ├── CHANGELOG.md └── tests ├── client_test.rs └── pubsub_test.rs /docs/api/.lock: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text eol=lf 2 | *.ico binary 3 | *.woff binary 4 | -------------------------------------------------------------------------------- /.rusty-hook.toml: -------------------------------------------------------------------------------- 1 | [hooks] 2 | pre-push = "cargo make ci-flow" 3 | -------------------------------------------------------------------------------- /docs/api/crates.js: -------------------------------------------------------------------------------- 1 | window.ALL_CRATES = ["simple_redis"]; 2 | //{"start":21,"fragment_lengths":[14]} -------------------------------------------------------------------------------- /docs/api/simple_redis/client/sidebar-items.js: -------------------------------------------------------------------------------- 1 | window.SIDEBAR_ITEMS = {"fn":["create"],"struct":["Client"]}; -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .c9 3 | /target 4 | temp/ 5 | **/*.rs.bk 6 | Cargo.lock 7 | **/*.log 8 | dump.rdb 9 | /rs*.sh 10 | /docs/_site 11 | /core 12 | -------------------------------------------------------------------------------- /docs/api/static.files/favicon-32x32-6580c154.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagiegurari/simple_redis/HEAD/docs/api/static.files/favicon-32x32-6580c154.png -------------------------------------------------------------------------------- /docs/api/simple_redis/sidebar-items.js: -------------------------------------------------------------------------------- 1 | window.SIDEBAR_ITEMS = {"fn":["create"],"mod":["client","types"],"type":["Interrupts","Message","RedisError","RedisResult"]}; -------------------------------------------------------------------------------- /docs/api/static.files/FiraMono-Medium-86f75c8c.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagiegurari/simple_redis/HEAD/docs/api/static.files/FiraMono-Medium-86f75c8c.woff2 -------------------------------------------------------------------------------- /docs/api/static.files/FiraMono-Regular-87c26294.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagiegurari/simple_redis/HEAD/docs/api/static.files/FiraMono-Regular-87c26294.woff2 -------------------------------------------------------------------------------- /docs/api/static.files/FiraSans-Italic-81dc35de.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagiegurari/simple_redis/HEAD/docs/api/static.files/FiraSans-Italic-81dc35de.woff2 -------------------------------------------------------------------------------- /docs/api/static.files/FiraSans-Medium-e1aa3f0a.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagiegurari/simple_redis/HEAD/docs/api/static.files/FiraSans-Medium-e1aa3f0a.woff2 -------------------------------------------------------------------------------- /docs/api/static.files/FiraSans-Regular-0fe48ade.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagiegurari/simple_redis/HEAD/docs/api/static.files/FiraSans-Regular-0fe48ade.woff2 -------------------------------------------------------------------------------- /docs/api/static.files/SourceSerif4-It-ca3b17ed.ttf.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagiegurari/simple_redis/HEAD/docs/api/static.files/SourceSerif4-It-ca3b17ed.ttf.woff2 -------------------------------------------------------------------------------- /docs/api/static.files/FiraSans-MediumItalic-ccf7e434.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagiegurari/simple_redis/HEAD/docs/api/static.files/FiraSans-MediumItalic-ccf7e434.woff2 -------------------------------------------------------------------------------- /docs/api/static.files/NanumBarunGothic-13b3dcba.ttf.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagiegurari/simple_redis/HEAD/docs/api/static.files/NanumBarunGothic-13b3dcba.ttf.woff2 -------------------------------------------------------------------------------- /docs/api/static.files/SourceCodePro-It-fc8b9304.ttf.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagiegurari/simple_redis/HEAD/docs/api/static.files/SourceCodePro-It-fc8b9304.ttf.woff2 -------------------------------------------------------------------------------- /docs/api/static.files/SourceSerif4-Bold-6d4fd4c0.ttf.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagiegurari/simple_redis/HEAD/docs/api/static.files/SourceSerif4-Bold-6d4fd4c0.ttf.woff2 -------------------------------------------------------------------------------- /docs/api/static.files/SourceSerif4-Regular-6b053e98.ttf.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagiegurari/simple_redis/HEAD/docs/api/static.files/SourceSerif4-Regular-6b053e98.ttf.woff2 -------------------------------------------------------------------------------- /src/connection_test.rs: -------------------------------------------------------------------------------- 1 | use super::*; 2 | 3 | #[test] 4 | fn create_check_state() { 5 | let mut connection = create(); 6 | assert!(!connection.is_connection_open()); 7 | } 8 | -------------------------------------------------------------------------------- /docs/api/static.files/SourceCodePro-Regular-8badfe75.ttf.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagiegurari/simple_redis/HEAD/docs/api/static.files/SourceCodePro-Regular-8badfe75.ttf.woff2 -------------------------------------------------------------------------------- /docs/api/static.files/SourceCodePro-Semibold-aa29a496.ttf.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagiegurari/simple_redis/HEAD/docs/api/static.files/SourceCodePro-Semibold-aa29a496.ttf.woff2 -------------------------------------------------------------------------------- /docs/api/static.files/SourceSerif4-Semibold-457a13ac.ttf.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagiegurari/simple_redis/HEAD/docs/api/static.files/SourceSerif4-Semibold-457a13ac.ttf.woff2 -------------------------------------------------------------------------------- /docs/api/src-files.js: -------------------------------------------------------------------------------- 1 | createSrcSidebar('[["simple_redis",["",[],["client.rs","commands.rs","connection.rs","lib.rs","subscriber.rs","types.rs"]]]]'); 2 | //{"start":19,"fragment_lengths":[104]} -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: cargo 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | time: '03:00' 8 | open-pull-requests-limit: 99 9 | -------------------------------------------------------------------------------- /docs/api/simple_redis/types/sidebar-items.js: -------------------------------------------------------------------------------- 1 | window.SIDEBAR_ITEMS = {"enum":["RedisError"],"struct":["Interrupts"],"trait":["RedisArg"],"type":["Message","RedisBoolResult","RedisEmptyResult","RedisResult","RedisStringResult"]}; -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | end_of_line = lf 7 | insert_final_newline = true 8 | trim_trailing_whitespace = true 9 | indent_style = space 10 | indent_size = 4 11 | 12 | [*.json] 13 | indent_size = 2 14 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/subscriber_test.rs: -------------------------------------------------------------------------------- 1 | use super::*; 2 | 3 | #[test] 4 | fn create_check_state() { 5 | let subscriber = create(); 6 | assert_eq!(subscriber.subscriptions.len(), 0); 7 | assert_eq!(subscriber.psubscriptions.len(), 0); 8 | assert!(subscriber.redis_connection.is_none()); 9 | } 10 | -------------------------------------------------------------------------------- /docs/api/type.impl/simple_redis/types/type.Message.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | var type_impls = Object.fromEntries([["simple_redis",[]]]); 3 | if (window.register_type_impls) { 4 | window.register_type_impls(type_impls); 5 | } else { 6 | window.pending_type_impls = type_impls; 7 | } 8 | })() 9 | //{"start":55,"fragment_lengths":[19]} -------------------------------------------------------------------------------- /docs/api/type.impl/simple_redis/types/type.RedisResult.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | var type_impls = Object.fromEntries([["simple_redis",[]]]); 3 | if (window.register_type_impls) { 4 | window.register_type_impls(type_impls); 5 | } else { 6 | window.pending_type_impls = type_impls; 7 | } 8 | })() 9 | //{"start":55,"fragment_lengths":[19]} -------------------------------------------------------------------------------- /src/lib_test.rs: -------------------------------------------------------------------------------- 1 | use super::*; 2 | use doc_comment as _; 3 | 4 | #[test] 5 | fn create_invalid_url() { 6 | let result = create("test/bad/url"); 7 | assert!(result.is_err()); 8 | } 9 | 10 | #[test] 11 | fn create_valid_url() { 12 | let mut client = create("redis://127.0.0.1:6379/").unwrap(); 13 | assert!(!client.is_connection_open()); 14 | } 15 | -------------------------------------------------------------------------------- /docs/api/trait.impl/simple_redis/types/trait.RedisArg.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | var implementors = Object.fromEntries([["simple_redis",[]]]); 3 | if (window.register_implementors) { 4 | window.register_implementors(implementors); 5 | } else { 6 | window.pending_implementors = implementors; 7 | } 8 | })() 9 | //{"start":57,"fragment_lengths":[19]} -------------------------------------------------------------------------------- /src/types_test.rs: -------------------------------------------------------------------------------- 1 | use super::*; 2 | use std::io::Write; 3 | 4 | #[test] 5 | fn redis_error_description() { 6 | let redis_error = RedisError::Description("test"); 7 | 8 | assert_eq!(redis_error.to_string(), "test"); 9 | 10 | let mut writer = Vec::new(); 11 | write!(&mut writer, "formatted {}", redis_error).unwrap(); 12 | assert_eq!(writer, b"formatted test"); 13 | } 14 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature Request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: sagiegurari 7 | 8 | --- 9 | 10 | ### Feature Description 11 | 12 | 13 | ### Describe The Solution You'd Like 14 | 15 | 16 | ### Code Sample 17 | 18 | ```rust 19 | /// paste code here 20 | ``` 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug Report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: sagiegurari 7 | 8 | --- 9 | 10 | ### Describe The Bug 11 | 12 | 13 | ### To Reproduce 14 | 15 | 16 | ### Error Stack 17 | 18 | ```console 19 | The error stack trace 20 | ``` 21 | 22 | ### Code Sample 23 | 24 | ```rust 25 | /// paste code here 26 | ``` 27 | -------------------------------------------------------------------------------- /docs/api/trait.impl/core/error/trait.Error.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | var implementors = Object.fromEntries([["simple_redis",[["impl Error for RedisError"]]]]); 3 | if (window.register_implementors) { 4 | window.register_implementors(implementors); 5 | } else { 6 | window.pending_implementors = implementors; 7 | } 8 | })() 9 | //{"start":57,"fragment_lengths":[294]} -------------------------------------------------------------------------------- /docs/api/trait.impl/core/fmt/trait.Display.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | var implementors = Object.fromEntries([["simple_redis",[["impl Display for RedisError"]]]]); 3 | if (window.register_implementors) { 4 | window.register_implementors(implementors); 5 | } else { 6 | window.pending_implementors = implementors; 7 | } 8 | })() 9 | //{"start":57,"fragment_lengths":[296]} -------------------------------------------------------------------------------- /docs/api/trait.impl/core/clone/trait.Clone.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | var implementors = Object.fromEntries([["simple_redis",[["impl Clone for Interrupts"]]]]); 3 | if (window.register_implementors) { 4 | window.register_implementors(implementors); 5 | } else { 6 | window.pending_implementors = implementors; 7 | } 8 | })() 9 | //{"start":57,"fragment_lengths":[300]} -------------------------------------------------------------------------------- /docs/api/trait.impl/core/marker/trait.Copy.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | var implementors = Object.fromEntries([["simple_redis",[["impl Copy for Interrupts"]]]]); 3 | if (window.register_implementors) { 4 | window.register_implementors(implementors); 5 | } else { 6 | window.pending_implementors = implementors; 7 | } 8 | })() 9 | //{"start":57,"fragment_lengths":[299]} -------------------------------------------------------------------------------- /docs/api/trait.impl/core/default/trait.Default.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | var implementors = Object.fromEntries([["simple_redis",[["impl Default for Interrupts"]]]]); 3 | if (window.register_implementors) { 4 | window.register_implementors(implementors); 5 | } else { 6 | window.pending_implementors = implementors; 7 | } 8 | })() 9 | //{"start":57,"fragment_lengths":[310]} -------------------------------------------------------------------------------- /benches/bench_commands.rs: -------------------------------------------------------------------------------- 1 | #![feature(test)] 2 | extern crate simple_redis; 3 | extern crate test; 4 | 5 | use test::Bencher; 6 | 7 | #[bench] 8 | fn set_get_del(bencher: &mut Bencher) { 9 | let mut client = simple_redis::create("redis://127.0.0.1:6379/").unwrap(); 10 | 11 | client.set("bnch_set_get", "my_value").unwrap(); 12 | client.get_string("bnch_set_get").unwrap(); 13 | client.del("bnch_set_get").unwrap(); 14 | 15 | assert!(client.is_connection_open()); 16 | 17 | bencher.iter(|| { 18 | client.set("bnch_set_get", "my_value").unwrap(); 19 | client.get_string("bnch_set_get").unwrap(); 20 | client.del("bnch_set_get").unwrap(); 21 | }); 22 | } 23 | -------------------------------------------------------------------------------- /examples/open_close_connection.rs: -------------------------------------------------------------------------------- 1 | use simple_redis; 2 | 3 | fn main() { 4 | match simple_redis::create("redis://127.0.0.1:6379/") { 5 | Ok(mut client) => { 6 | println!("Created Redis Client"); 7 | 8 | match client.set("my_key", "my_value") { 9 | Err(error) => println!("Unable to set value in Redis: {}", error), 10 | _ => println!("Value set in Redis"), 11 | }; 12 | 13 | match client.quit() { 14 | Err(error) => println!("Error: {}", error), 15 | _ => println!("Connection Closed."), 16 | } 17 | } 18 | Err(error) => println!("Unable to create Redis client: {}", error), 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Makefile.toml: -------------------------------------------------------------------------------- 1 | 2 | [config] 3 | additional_profiles = [ 4 | "all-default-tasks", 5 | "docs-all-modification-tasks", 6 | "ci-coverage-tasks", 7 | "ci-all-build-tasks", 8 | "ci-static-code-analysis-tasks", 9 | "publish-pre-cleanup", 10 | ] 11 | 12 | [tasks.start-redis] 13 | dependencies = ["stop-redis"] 14 | script = ''' 15 | echo "Starting Redis" 16 | redis-server --loglevel warning & 17 | sleep 1 18 | ''' 19 | 20 | [tasks.stop-redis] 21 | script = ''' 22 | echo "Stopping any running Redis" 23 | ps -ef | grep [r]edis-server | awk '{print $2}' | xargs kill -9 || true 24 | ''' 25 | 26 | [tasks.pre-test] 27 | condition = { env_false = ['CARGO_MAKE_CI'] } 28 | run_task = "start-redis" 29 | 30 | [tasks.post-test] 31 | condition = { env_false = ['CARGO_MAKE_CI'] } 32 | run_task = "stop-redis" 33 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | on: [push, pull_request] 3 | env: 4 | CLICOLOR_FORCE: 1 5 | jobs: 6 | ci: 7 | name: CI 8 | runs-on: ${{ matrix.os }} 9 | strategy: 10 | fail-fast: false 11 | matrix: 12 | rust: [stable, beta, nightly] 13 | os: [ubuntu-latest, macOS-latest] 14 | steps: 15 | - name: Checkout 16 | uses: actions/checkout@v4 17 | - name: Install rust 18 | uses: dtolnay/rust-toolchain@master 19 | with: 20 | toolchain: ${{ matrix.rust }} 21 | - name: Install cargo-make 22 | run: cargo install --debug cargo-make 23 | - name: Startup Redis 24 | uses: shogo82148/actions-setup-redis@v1 25 | with: 26 | redis-version: '5.x' 27 | - name: Run CI 28 | env: 29 | CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} 30 | run: cargo make ci-flow 31 | -------------------------------------------------------------------------------- /docs/api/trait.impl/core/fmt/trait.Debug.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | var implementors = Object.fromEntries([["simple_redis",[["impl Debug for RedisError"],["impl Debug for Interrupts"]]]]); 3 | if (window.register_implementors) { 4 | window.register_implementors(implementors); 5 | } else { 6 | window.pending_implementors = implementors; 7 | } 8 | })() 9 | //{"start":57,"fragment_lengths":[568]} -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "simple_redis" 3 | version = "0.6.5" 4 | authors = ["Sagie Gur-AriU::from(self).\nReturns true if the currently stored connection is valid, …\nReturns true if subscribed to the provided channel pattern.\nReturns true if subscribed to the provided channel.\nSee redis KEYS command.\nSee redis HGET command.\nSee redis HGET command.\nSee redis LLEN command.\nSee redis LPOP command.\nSee redis LPUSH command.\nSee redis LPUSHX command.\nSee redis LRANGE command.\nSee redis LREM command.\nSee redis LSET command.\nSee redis LTRIM command.\nSee redis PERSIST command.\nSee redis PEXPIRE command.\nSubscribes to the provided channel pattern. Actual …\nSee redis PUBLISH command.\nUnsubscribes from the provided channel pattern.\nCloses the internal connection to redis. The client can …\nSee redis RENAME command.\nSee redis RENAMENX command.\nSee redis RPOP command.\nSee redis RPUSH command.\nSee redis RPUSHX command.\nInvokes the requested command with the provided arguments …\ninvokes the run_command but returns bool result\ninvokes the run_command but returns empty result\ninvokes the run_command and returns typed result\ninvokes the run_command but returns string result\nSee redis SADD command.\nSee redis SCARD command.\nSee redis SDIFF command.\nSee redis SET command.\nSee redis SETEX command.\nSee redis SETNX command.\nSee redis SISMEMBER command.\nSee redis SMEMBERS command.\nSee redis SMOVE command.\nSee redis SREM command.\nSee redis STRLEN command.\nSubscribes to the provided channel. Actual subscription …\nUnsubscribes from the provided channel.\nUnsubscribes from all channels.\nSee redis ZADD command.\nSee redis ZRANGE command.\nDescription text of the error reason\nContains the error value\nContains the error value\nContains the error value\nContains the error value\nEnable to modify blocking operations.\nPubSub message\nContains the success value\nContains the success value\nContains the success value\nContains the success value\nDefines a redis command argument\nHolds bool result or error\nHolds empty result or error\nHolds the error information\nRoot redis error\nRedis result which either holds a value or a Redis error\nHolds string result or error\nFormats the value using the given formatter.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nReturns a new instance.\nNext polling time in millies\nNotify blocking operation to stop")
--------------------------------------------------------------------------------
/docs/api/static.files/src-script-813739b1.js:
--------------------------------------------------------------------------------
1 | "use strict";(function(){const rootPath=getVar("root-path");const NAME_OFFSET=0;const DIRS_OFFSET=1;const FILES_OFFSET=2;const RUSTDOC_MOBILE_BREAKPOINT=700;function closeSidebarIfMobile(){if(window.innerWidthImplements the redis client capabilities.
3 |redis://[:<passwd>@]<hostname>[:port][/<db>]pub type RedisError = RedisError;Error Type
2 |pub enum RedisError {
3 | RedisError(RedisError),
4 | Description(&'static str),
5 | }pub type RedisResult<T> = RedisResult<T>;Redis result which either holds a value or a Redis error
2 |pub enum RedisResult<T> {
3 | Ok(T),
4 | Err(RedisError),
5 | }pub type RedisBoolResult = RedisResult<bool>;Holds bool result or error
2 |pub enum RedisBoolResult {
3 | Ok(bool),
4 | Err(RedisError),
5 | }pub type RedisEmptyResult = RedisResult<()>;Holds empty result or error
2 |pub enum RedisEmptyResult {
3 | Ok(()),
4 | Err(RedisError),
5 | }pub type RedisResult<T> = Result<T, RedisError>;Redis result which either holds a value or a Redis error
2 |pub enum RedisResult<T> {
3 | Ok(T),
4 | Err(RedisError),
5 | }pub fn create(connection_string: &str) -> Result<Client, RedisError>Constructs a new redis client.
2 | The redis connection string must be in the following format: redis://[:<passwd>@]<hostname>[:port][/<db>]
connection_string - The connection string in the format of: redis://[:<passwd>@]<hostname>[:port][/<db>]extern crate simple_redis;
9 |
10 | fn main() {
11 | match simple_redis::create("redis://127.0.0.1:6379/") {
12 | Ok(client) => println!("Created Redis Client"),
13 | Err(error) => println!("Unable to create Redis client: {}", error)
14 | }
15 | }pub type Interrupts = Interrupts;Blocking operations interrupts
2 |pub struct Interrupts {
3 | pub stop: bool,
4 | pub next_polling_time: Option<u64>,
5 | }stop: boolNotify blocking operation to stop
6 |next_polling_time: Option<u64>Next polling time in millies
7 |pub type RedisStringResult = RedisResult<String>;Holds string result or error
2 |pub enum RedisStringResult {
3 | Ok(String),
4 | Err(RedisError),
5 | }pub fn create(connection_string: &str) -> Result<Client, RedisError>Constructs a new redis client.
2 | The redis connection string must be in the following format: redis://[:<passwd>@]<hostname>[:port][/<db>]
connection_string - The connection string in the format of: redis://[:<passwd>@]<hostname>[:port][/<db>]extern crate simple_redis;
9 | fn main() {
10 | match simple_redis::create("redis://127.0.0.1:6379/") {
11 | Ok(client) => println!("Created Redis Client"),
12 | Err(error) => println!("Unable to create Redis client: {}", error)
13 | }
14 | }Defines the various types and aliases used or exposed by the simple_redis library.
3 |source. Read moreReturns a new instance.
\n