[][src]Struct db::cache_structures::socket::CacheSocket

pub struct CacheSocket {
    pub uid: UID,
    pub ip: String,
    pub port: u16,
    // some fields omitted
}

Template structure to for raw socket information

Fields

uid: UID

unique id of socket

ip: String

ip address of where socket is coming form

port: u16

port of where socket is coming from

Methods

impl<'a> CacheSocket[src]

pub fn new_with_uid(uid: UID) -> Self[src]

create instance of socket with supplied UID

pub fn new() -> Self[src]

create blank instance of Socket

pub fn set_address(&mut self, addr: &SocketAddr) -> &mut Self[src]

set ip and port for this struct with a supplied std::net::SocketAddr

pub fn set_ip(&mut self, ip: &'a str) -> &mut Self[src]

set ip for this struct

pub fn set_port(&mut self, port: u16) -> &mut Self[src]

set port for this struct

pub fn set_value<F: ToRedisArgs + ToString, V: ToRedisArgs + ToString>(
    &mut self,
    field: F,
    value: V
) -> RedisResult<()>
[src]

set key and value

pub fn get_value<T: FromStr + Debug>(
    &mut self,
    field_name: &'a str
) -> Option<T> where
    T::Err: Debug
[src]

retrieve a value from field of struct, if it does not exist, will return None

Trait Implementations

impl Cachable for CacheSocket[src]

Auto Trait Implementations

impl RefUnwindSafe for CacheSocket

impl Send for CacheSocket

impl Sync for CacheSocket

impl Unpin for CacheSocket

impl UnwindSafe for CacheSocket

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoSql for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,