Enum fred::types::RedisValue [] [src]

pub enum RedisValue {
    Integer(i64),
    String(String),
    Null,
    // some variants omitted
}

A value used in a Redis command.

Variants

Methods

impl RedisValue
[src]

[src]

Returns the original string as an error if the parsing fails, otherwise this consumes the original string.

[src]

Check the specific data type used to represent the value.

[src]

Check if the value is null.

[src]

Check if the value is an integer.

[src]

Check if the value is a string.

[src]

Check if the inner string value can be coerced to an f64.

[src]

Read and return the inner value as a u64, if possible.

[src]

Read and return the inner value as a i64, if possible.

[src]

Read and return the inner value as a f64, if possible.

[src]

Read and return the inner String if the value is a string or integer.

[src]

Convert from a u64 to the i64 representation used by Redis. This can fail due to overflow so it is not implemented via the From trait.

[src]

[src]

Replace this RedisValue instance with RedisValue::Null, returning the original value.

Trait Implementations

impl Clone for RedisValue
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for RedisValue
[src]

[src]

Formats the value using the given formatter.

impl PartialEq for RedisValue
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl Eq for RedisValue
[src]

impl Hash for RedisValue
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl From<u8> for RedisValue
[src]

[src]

Performs the conversion.

impl From<u16> for RedisValue
[src]

[src]

Performs the conversion.

impl From<u32> for RedisValue
[src]

[src]

Performs the conversion.

impl From<i8> for RedisValue
[src]

[src]

Performs the conversion.

impl From<i16> for RedisValue
[src]

[src]

Performs the conversion.

impl From<i32> for RedisValue
[src]

[src]

Performs the conversion.

impl From<i64> for RedisValue
[src]

[src]

Performs the conversion.

impl From<f32> for RedisValue
[src]

[src]

Performs the conversion.

impl From<f64> for RedisValue
[src]

[src]

Performs the conversion.

impl From<String> for RedisValue
[src]

[src]

Performs the conversion.

impl<'a> From<&'a str> for RedisValue
[src]

[src]

Performs the conversion.

impl<'a> From<&'a String> for RedisValue
[src]

[src]

Performs the conversion.

impl<T: Into<RedisValue>> From<Option<T>> for RedisValue
[src]

[src]

Performs the conversion.

impl From<RedisKey> for RedisValue
[src]

[src]

Performs the conversion.

impl<T: Into<RedisValue>> From<Vec<T>> for RedisValue
[src]

[src]

Performs the conversion.

impl<T: Hash + Eq + Into<RedisValue>> From<HashSet<T>> for RedisValue
[src]

[src]

Performs the conversion.

impl<K: Hash + Eq + Into<RedisKey>, V: Into<RedisValue>> From<HashMap<K, V>> for RedisValue
[src]

[src]

Performs the conversion.