[−][src]Struct db::cache_structures::socket::CacheSocket
Template structure to for raw socket information
Fields
uid: UIDunique id of socket
ip: Stringip address of where socket is coming form
port: u16port 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]
&mut self,
field: F,
value: V
) -> RedisResult<()>
set key and value
pub fn get_value<T: FromStr + Debug>(
&mut self,
field_name: &'a str
) -> Option<T> where
T::Err: Debug, [src]
&mut self,
field_name: &'a str
) -> Option<T> where
T::Err: Debug,
retrieve a value from field of struct, if it does not exist, will return None
Trait Implementations
impl Cachable for CacheSocket[src]
fn dump(&mut self) -> RedisResult<()>[src]
fn load(self) -> RedisResult<Self>[src]
fn destruct(self) -> RedisResult<()>[src]
fn uid(&self) -> UID[src]
fn name(&self) -> &str[src]
fn make_key<'a>(&self, field_name: &'a str) -> String[src]
fn create_tag<'a, T: ToRedisArgs + ToString>(
&self,
field_name: &'a str,
field_value: &'a T
) -> (String, String)[src]
&self,
field_name: &'a str,
field_value: &'a T
) -> (String, String)
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]
T: 'static + ?Sized,
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> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> IntoSql for T
fn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
&'a Self: AsExpression<T>,
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<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,