Type Alias micro_types::bool

source ·
pub type bool = RedisGeneric<bool>;

Aliased Type§

struct bool { /* private fields */ }

Implementations§

source§

impl<T> RedisGeneric<T>

source

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);
source

pub fn set(self, value: T) -> Selfwhere T: ToRedisArgs,

The set method sets the value of the type.

source

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);
source

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,

§

type Output = RedisGeneric<T>

The resulting type after applying the + operator.
source§

fn add(self, rhs: RedisGeneric<T>) -> Self::Output

Performs the + operation. Read more
source§

impl<T> Add<T> for RedisGeneric<T>where T: Add<Output = T> + ToRedisArgs + Copy,

§

type Output = RedisGeneric<T>

The resulting type after applying the + operator.
source§

fn add(self, rhs: T) -> Self::Output

Performs the + operation. Read more
source§

impl<T> AddAssign<RedisGeneric<T>> for RedisGeneric<T>where T: AddAssign + ToRedisArgs,

source§

fn add_assign(&mut self, rhs: RedisGeneric<T>)

Performs the += operation. Read more
source§

impl<T> AddAssign<T> for RedisGeneric<T>where T: AddAssign + ToRedisArgs,

source§

fn add_assign(&mut self, rhs: T)

Performs the += operation. Read more
source§

impl<T> BackedType<T> for RedisGeneric<T>

source§

fn get_conn(&self) -> Connection

The get_conn method returns a mutable reference to the redis::Connection.
source§

fn get(&self) -> &T

The get method returns a reference to the value stored in the type.
source§

impl<T> BitAnd<RedisGeneric<T>> for RedisGeneric<T>where T: BitAnd<Output = T> + ToRedisArgs + Copy,

§

type Output = RedisGeneric<T>

The resulting type after applying the & operator.
source§

fn bitand(self, rhs: RedisGeneric<T>) -> Self::Output

Performs the & operation. Read more
source§

impl<T> BitAnd<T> for RedisGeneric<T>where T: BitAnd<Output = T> + ToRedisArgs + Copy,

§

type Output = RedisGeneric<T>

The resulting type after applying the & operator.
source§

fn bitand(self, rhs: T) -> Self::Output

Performs the & operation. Read more
source§

impl<T> BitOr<RedisGeneric<T>> for RedisGeneric<T>where T: BitOr<Output = T> + ToRedisArgs + Copy,

§

type Output = RedisGeneric<T>

The resulting type after applying the | operator.
source§

fn bitor(self, rhs: RedisGeneric<T>) -> Self::Output

Performs the | operation. Read more
source§

impl<T> BitOr<T> for RedisGeneric<T>where T: BitOr<Output = T> + ToRedisArgs + Copy,

§

type Output = RedisGeneric<T>

The resulting type after applying the | operator.
source§

fn bitor(self, rhs: T) -> Self::Output

Performs the | operation. Read more
source§

impl<T> BitXor<RedisGeneric<T>> for RedisGeneric<T>where T: BitXor<Output = T> + ToRedisArgs + Copy,

§

type Output = RedisGeneric<T>

The resulting type after applying the ^ operator.
source§

fn bitxor(self, rhs: RedisGeneric<T>) -> Self::Output

Performs the ^ operation. Read more
source§

impl<T> BitXor<T> for RedisGeneric<T>where T: BitXor<Output = T> + ToRedisArgs + Copy,

§

type Output = RedisGeneric<T>

The resulting type after applying the ^ operator.
source§

fn bitxor(self, rhs: T) -> Self::Output

Performs the ^ operation. Read more
source§

impl<T: Debug> Debug for RedisGeneric<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T> Deref for RedisGeneric<T>

§

type Target = T

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<T> Div<RedisGeneric<T>> for RedisGeneric<T>where T: Div<Output = T> + ToRedisArgs + Copy,

§

type Output = RedisGeneric<T>

The resulting type after applying the / operator.
source§

fn div(self, rhs: RedisGeneric<T>) -> Self::Output

Performs the / operation. Read more
source§

impl<T> Div<T> for RedisGeneric<T>where T: Div<Output = T> + ToRedisArgs + Copy,

§

type Output = RedisGeneric<T>

The resulting type after applying the / operator.
source§

fn div(self, rhs: T) -> Self::Output

Performs the / operation. Read more
source§

impl<T> Mul<RedisGeneric<T>> for RedisGeneric<T>where T: Mul<Output = T> + ToRedisArgs + Copy,

§

type Output = RedisGeneric<T>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: RedisGeneric<T>) -> Self::Output

Performs the * operation. Read more
source§

impl<T> Mul<T> for RedisGeneric<T>where T: Mul<Output = T> + ToRedisArgs + Copy,

§

type Output = RedisGeneric<T>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: T) -> Self::Output

Performs the * operation. Read more
source§

impl<T> Not for RedisGeneric<T>where T: Not<Output = T> + ToRedisArgs + Copy,

§

type Output = RedisGeneric<T>

The resulting type after applying the ! operator.
source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
source§

impl<T: PartialEq> PartialEq<RedisGeneric<T>> for RedisGeneric<T>

source§

fn eq(&self, other: &RedisGeneric<T>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T: PartialEq> PartialEq<T> for RedisGeneric<T>

source§

fn eq(&self, other: &T) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T> Sub<RedisGeneric<T>> for RedisGeneric<T>where T: Sub<Output = T> + ToRedisArgs + Copy,

§

type Output = RedisGeneric<T>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: RedisGeneric<T>) -> Self::Output

Performs the - operation. Read more
source§

impl<T> Sub<T> for RedisGeneric<T>where T: Sub<Output = T> + ToRedisArgs + Copy,

§

type Output = RedisGeneric<T>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: T) -> Self::Output

Performs the - operation. Read more
source§

impl<T> SubAssign<RedisGeneric<T>> for RedisGeneric<T>where T: SubAssign + ToRedisArgs,

source§

fn sub_assign(&mut self, rhs: RedisGeneric<T>)

Performs the -= operation. Read more
source§

impl<T> SubAssign<T> for RedisGeneric<T>where T: SubAssign + ToRedisArgs,

source§

fn sub_assign(&mut self, rhs: T)

Performs the -= operation. Read more