[−][src]Struct redis::geo::Coord
A coordinate (longitude, latitude). Can be used with geo_pos
to parse response from Redis.
T
is the type of the every value.
- You may want to use either
f64
orf32
if you want to perform mathematical operations. - To keep the raw value from Redis, use
String
.
Fields
longitude: T
latitude: T
Methods
impl<T> Coord<T>
[src]
pub fn lon_lat(longitude: T, latitude: T) -> Coord<T>
[src]
Create a new Coord with the (longitude, latitude)
Trait Implementations
impl<T: ToRedisArgs> ToRedisArgs for Coord<T>
[src]
fn write_redis_args<W: ?Sized>(&self, out: &mut W) where
W: RedisWrite,
[src]
W: RedisWrite,
fn is_single_arg(&self) -> bool
[src]
fn to_redis_args(&self) -> Vec<Vec<u8>>
[src]
This converts the value into a vector of bytes. Each item is a single argument. Most items generate a vector of a single item. Read more
fn describe_numeric_behavior(&self) -> NumericBehavior
[src]
Returns an information about the contained value with regards to it's numeric behavior in a redis context. This is used in some high level concepts to switch between different implementations of redis functions (for instance INCR
vs INCRBYFLOAT
). Read more
impl<T: FromRedisValue> FromRedisValue for Coord<T>
[src]
fn from_redis_value(v: &Value) -> RedisResult<Self>
[src]
fn from_redis_values(items: &[Value]) -> RedisResult<Vec<Self>>
[src]
Similar to from_redis_value
but constructs a vector of objects from another vector of values. This primarily exists internally to customize the behavior for vectors of tuples. Read more
impl<T: PartialEq> PartialEq<Coord<T>> for Coord<T>
[src]
impl<T: Debug> Debug for Coord<T>
[src]
Auto Trait Implementations
impl<T> Unpin for Coord<T> where
T: Unpin,
T: Unpin,
impl<T> Sync for Coord<T> where
T: Sync,
T: Sync,
impl<T> Send for Coord<T> where
T: Send,
T: Send,
impl<T> UnwindSafe for Coord<T> where
T: UnwindSafe,
T: UnwindSafe,
impl<T> RefUnwindSafe for Coord<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,