pub fn sscan<'a, K>(&'a mut self, key: &'a K) -> ScanBuilder
    where
        K: AsRef<[u8]>,
    {
        ScanBuilder::new("SSCAN", Some(key.as_ref()), self)
    }
///Scan for elements in a set.
///# Return value
///Returns a list of the elements which matched in the set.
///# Example
///```
/// use darkredis::Connection;
/// use futures::StreamExt;
///# #[cfg_attr(feature = "runtime_tokio", tokio::main)]
///# #[cfg_attr(feature = "runtime_async_std", async_std::main)]
/// # async fn main() {
///
/// let mut connection = Connection::connect("127.0.0.1:6379").await.unwrap();
/// let key = b"test-set".to_vec();
/// # connection.del(&key).await.unwrap();
/// connection.sadd(&key, "foo").await.unwrap();
/// connection.sadd(&key, "bar").await.unwrap();
///
/// let results = connection.sscan(&key).run()
///   .collect::<Vec<Vec<u8>>>().await;
///
/// assert!(results.contains(&b"foo".to_vec()));
/// assert!(results.contains(&b"bar".to_vec()));
/// # connection.del(&key).await.unwrap();
/// # }
///```
Scan for elements in a set.
Scan for elements in a set .
pub fn sscan<'a, K>(&'a mut self, key: &'a K) -> ScanBuilder
    where
        K: AsRef<[u8]>,
    {
        ScanBuilder::new("SSCAN", Some(key.as_ref()), self)
    }
pub fn sscan < ' a , K > ( & ' a mut self , key : & ' a K ) -> ScanBuilder where K : AsRef < [ u8 ] > , { ScanBuilder :: new ( " " , Some ( key . as_ref ( ) ) , self ) }
Scan for elements in a set.
Scan for elements in a set .
&'a mut self
key
&'a K
&'a mut self
key
&'a K
return value
Returns a list of the elements which matched in the set.
Returns a list of the elements which matched in the set .
example
```
use darkredis::Connection;
use futures::StreamExt.
` ` ` use darkredis :: Connection ; use futures :: StreamExt .
#[cfg_attr(feature = "runtime_tokio", tokio::main)]
None
#[cfg_attr(feature = "runtime_async_std", async_std::main)]
async fn main() {

let mut connection = Connection::connect("127.0.0.1:6379").await.unwrap();
let key = b"test-set".to_vec();
connection.del(&key).await.unwrap();
connection.sadd(&key, "foo").await.unwrap();
connection.sadd(&key, "bar").await.unwrap().

let results = connection.sscan(&key).run()
.collect::>>().await.

assert!(results.contains(&b"foo".to_vec()));
assert!(results.contains(&b"bar".to_vec()));
connection.del(&key).await.unwrap();
}
```
async fn main () { let mut connection = Connection :: connect ( " 127 . 0 . 0 . 1 : 6379 " ) . await . unwrap () ; let key = b " test - set " . to_vec () ; connection . del ( &key ) . await . unwrap () ; connection . sadd ( &key " foo " ) . await . unwrap () ; connection . sadd ( &key " bar " ) . await . unwrap () . let results = connection . sscan ( &key ) . run () . collect :: >> () . await . assert! ( results . contains ( &b " foo " . to_vec () )) ; assert! ( results . contains ( &b " bar " . to_vec () )) ; connection . del ( &key ) . await . unwrap () ; } ` ` `