Type Alias micro_types::bool
source · pub type bool = RedisGeneric<bool>;Aliased Type§
struct bool { /* private fields */ }Implementations§
source§impl<T> RedisGeneric<T>
impl<T> RedisGeneric<T>
sourcepub fn new(value: T, client: Client, field_name: String) -> RedisGeneric<T>
pub fn new(value: T, client: Client, field_name: String) -> RedisGeneric<T>
The new method creates a new instance of the type.
Example
use types::i32;
use types::BackedType;
let client = redis::Client::open("redis://localhost:6379").unwrap();
let mut i32 = i32::new(1, client.clone(), "test_add".to_string());
i32 = i32 + i32::new(2, client, "test_add2".to_string());
assert_eq!(i32, 3);sourcepub fn set(self, value: T) -> Selfwhere
T: ToRedisArgs,
pub fn set(self, value: T) -> Selfwhere T: ToRedisArgs,
The set method sets the value of the type.
sourcepub fn get(&self) -> &T
pub fn get(&self) -> &T
The get method returns a reference to the value stored in the type.
Example
use types::i32;
use types::BackedType;
let client = redis::Client::open("redis://localhost:6379").unwrap();
let mut i32 = i32::new(1, client.clone(), "test_add".to_string());
i32 = i32 + i32::new(2, client, "test_add2".to_string());
assert_eq!(i32.get(), &3);sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
The into_inner method returns the inner value of the type. This method consumes the type.
Example
use types::i32;
use types::BackedType;
let client = redis::Client::open("redis://localhost:6379").unwrap();
let mut i32 = i32::new(1, client.clone(), "test_add".to_string());
i32 = i32 + i32::new(2, client, "test_add2".to_string());
let i32_inner = i32.into_inner();
assert_eq!(i32_inner, 3);Trait Implementations§
source§impl<T> Add<RedisGeneric<T>> for RedisGeneric<T>where
T: Add<Output = T> + ToRedisArgs + Copy,
impl<T> Add<RedisGeneric<T>> for RedisGeneric<T>where T: Add<Output = T> + ToRedisArgs + Copy,
§type Output = RedisGeneric<T>
type Output = RedisGeneric<T>
The resulting type after applying the
+ operator.source§impl<T> Add<T> for RedisGeneric<T>where
T: Add<Output = T> + ToRedisArgs + Copy,
impl<T> Add<T> for RedisGeneric<T>where T: Add<Output = T> + ToRedisArgs + Copy,
source§impl<T> AddAssign<RedisGeneric<T>> for RedisGeneric<T>where
T: AddAssign + ToRedisArgs,
impl<T> AddAssign<RedisGeneric<T>> for RedisGeneric<T>where T: AddAssign + ToRedisArgs,
source§fn add_assign(&mut self, rhs: RedisGeneric<T>)
fn add_assign(&mut self, rhs: RedisGeneric<T>)
Performs the
+= operation. Read moresource§impl<T> AddAssign<T> for RedisGeneric<T>where
T: AddAssign + ToRedisArgs,
impl<T> AddAssign<T> for RedisGeneric<T>where T: AddAssign + ToRedisArgs,
source§fn add_assign(&mut self, rhs: T)
fn add_assign(&mut self, rhs: T)
Performs the
+= operation. Read moresource§impl<T> BackedType<T> for RedisGeneric<T>
impl<T> BackedType<T> for RedisGeneric<T>
source§impl<T> BitAnd<RedisGeneric<T>> for RedisGeneric<T>where
T: BitAnd<Output = T> + ToRedisArgs + Copy,
impl<T> BitAnd<RedisGeneric<T>> for RedisGeneric<T>where T: BitAnd<Output = T> + ToRedisArgs + Copy,
§type Output = RedisGeneric<T>
type Output = RedisGeneric<T>
The resulting type after applying the
& operator.source§impl<T> BitAnd<T> for RedisGeneric<T>where
T: BitAnd<Output = T> + ToRedisArgs + Copy,
impl<T> BitAnd<T> for RedisGeneric<T>where T: BitAnd<Output = T> + ToRedisArgs + Copy,
source§impl<T> BitOr<RedisGeneric<T>> for RedisGeneric<T>where
T: BitOr<Output = T> + ToRedisArgs + Copy,
impl<T> BitOr<RedisGeneric<T>> for RedisGeneric<T>where T: BitOr<Output = T> + ToRedisArgs + Copy,
§type Output = RedisGeneric<T>
type Output = RedisGeneric<T>
The resulting type after applying the
| operator.source§impl<T> BitOr<T> for RedisGeneric<T>where
T: BitOr<Output = T> + ToRedisArgs + Copy,
impl<T> BitOr<T> for RedisGeneric<T>where T: BitOr<Output = T> + ToRedisArgs + Copy,
source§impl<T> BitXor<RedisGeneric<T>> for RedisGeneric<T>where
T: BitXor<Output = T> + ToRedisArgs + Copy,
impl<T> BitXor<RedisGeneric<T>> for RedisGeneric<T>where T: BitXor<Output = T> + ToRedisArgs + Copy,
§type Output = RedisGeneric<T>
type Output = RedisGeneric<T>
The resulting type after applying the
^ operator.source§impl<T> BitXor<T> for RedisGeneric<T>where
T: BitXor<Output = T> + ToRedisArgs + Copy,
impl<T> BitXor<T> for RedisGeneric<T>where T: BitXor<Output = T> + ToRedisArgs + Copy,
source§impl<T: Debug> Debug for RedisGeneric<T>
impl<T: Debug> Debug for RedisGeneric<T>
source§impl<T> Deref for RedisGeneric<T>
impl<T> Deref for RedisGeneric<T>
source§impl<T> Div<RedisGeneric<T>> for RedisGeneric<T>where
T: Div<Output = T> + ToRedisArgs + Copy,
impl<T> Div<RedisGeneric<T>> for RedisGeneric<T>where T: Div<Output = T> + ToRedisArgs + Copy,
§type Output = RedisGeneric<T>
type Output = RedisGeneric<T>
The resulting type after applying the
/ operator.source§impl<T> Div<T> for RedisGeneric<T>where
T: Div<Output = T> + ToRedisArgs + Copy,
impl<T> Div<T> for RedisGeneric<T>where T: Div<Output = T> + ToRedisArgs + Copy,
source§impl<T> Mul<RedisGeneric<T>> for RedisGeneric<T>where
T: Mul<Output = T> + ToRedisArgs + Copy,
impl<T> Mul<RedisGeneric<T>> for RedisGeneric<T>where T: Mul<Output = T> + ToRedisArgs + Copy,
§type Output = RedisGeneric<T>
type Output = RedisGeneric<T>
The resulting type after applying the
* operator.source§impl<T> Mul<T> for RedisGeneric<T>where
T: Mul<Output = T> + ToRedisArgs + Copy,
impl<T> Mul<T> for RedisGeneric<T>where T: Mul<Output = T> + ToRedisArgs + Copy,
source§impl<T> Not for RedisGeneric<T>where
T: Not<Output = T> + ToRedisArgs + Copy,
impl<T> Not for RedisGeneric<T>where T: Not<Output = T> + ToRedisArgs + Copy,
source§impl<T: PartialEq> PartialEq<RedisGeneric<T>> for RedisGeneric<T>
impl<T: PartialEq> PartialEq<RedisGeneric<T>> for RedisGeneric<T>
source§fn eq(&self, other: &RedisGeneric<T>) -> bool
fn eq(&self, other: &RedisGeneric<T>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<T: PartialEq> PartialEq<T> for RedisGeneric<T>
impl<T: PartialEq> PartialEq<T> for RedisGeneric<T>
source§impl<T> Sub<RedisGeneric<T>> for RedisGeneric<T>where
T: Sub<Output = T> + ToRedisArgs + Copy,
impl<T> Sub<RedisGeneric<T>> for RedisGeneric<T>where T: Sub<Output = T> + ToRedisArgs + Copy,
§type Output = RedisGeneric<T>
type Output = RedisGeneric<T>
The resulting type after applying the
- operator.source§impl<T> Sub<T> for RedisGeneric<T>where
T: Sub<Output = T> + ToRedisArgs + Copy,
impl<T> Sub<T> for RedisGeneric<T>where T: Sub<Output = T> + ToRedisArgs + Copy,
source§impl<T> SubAssign<RedisGeneric<T>> for RedisGeneric<T>where
T: SubAssign + ToRedisArgs,
impl<T> SubAssign<RedisGeneric<T>> for RedisGeneric<T>where T: SubAssign + ToRedisArgs,
source§fn sub_assign(&mut self, rhs: RedisGeneric<T>)
fn sub_assign(&mut self, rhs: RedisGeneric<T>)
Performs the
-= operation. Read moresource§impl<T> SubAssign<T> for RedisGeneric<T>where
T: SubAssign + ToRedisArgs,
impl<T> SubAssign<T> for RedisGeneric<T>where T: SubAssign + ToRedisArgs,
source§fn sub_assign(&mut self, rhs: T)
fn sub_assign(&mut self, rhs: T)
Performs the
-= operation. Read more