Skip to content

Commit

Permalink
impl async_std::io::Read for Command (#19)
Browse files Browse the repository at this point in the history
* [wip] starting 3.0 w/ support for using commands as impl Read

* better error message

* ownship changes
  • Loading branch information
dadleyy committed Jul 19, 2023
1 parent f8b1aa4 commit 78c9ea5
Show file tree
Hide file tree
Showing 8 changed files with 273 additions and 96 deletions.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kramer"
version = "2.1.0"
version = "3.0.0"
authors = ["Danny Hadley <dadleyy@gmail.com>"]
edition = "2018"
license = "MIT"
Expand All @@ -15,4 +15,5 @@ optional = true

[features]
kramer-async = ["async-std"]
kramer-async-read = ["kramer-async"]
acl = []
10 changes: 2 additions & 8 deletions src/acl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ use super::modifiers::{format_bulk_string, Arity};
/// Notice: Currently `Display` is only implemented if all fields are present/`Some`.
#[cfg(feature = "acl")]
#[derive(Debug)]
pub struct SetUser<S>
where
S: std::fmt::Display,
{
pub struct SetUser<S> {
/// The name of the ACL entry.
pub name: S,

Expand All @@ -36,10 +33,7 @@ where
/// Redis acl commands.
#[cfg(feature = "acl")]
#[derive(Debug)]
pub enum AclCommand<S>
where
S: std::fmt::Display,
{
pub enum AclCommand<S> {
/// Requests a list of all acl entries.
List,

Expand Down
6 changes: 1 addition & 5 deletions src/hashes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ use crate::modifiers::{format_bulk_string, Arity, Insertion};
/// `HashCommand` represents the possible redis operations of keys that
/// are a hash type.
#[derive(Debug)]
pub enum HashCommand<S, V>
where
S: std::fmt::Display,
V: std::fmt::Display,
{
pub enum HashCommand<S, V> {
/// Deletes fields from a given hash.
Del(S, Arity<S>),

Expand Down
Loading

0 comments on commit 78c9ea5

Please sign in to comment.