[][src]Trait libaster::proxy::standalone::Request

pub trait Request: Clone {
    type Reply: Clone + IntoReply<Self::Reply> + From<AsError>;
    type FrontCodec: Decoder<Item = Self, Error = AsError> + Encoder<Item = Self, Error = AsError> + Default + 'static;
    type BackCodec: Decoder<Item = Self::Reply, Error = AsError> + Encoder<Item = Self, Error = AsError> + Default + 'static;
    pub fn ping_request() -> Self;
pub fn reregister(&mut self, task: Task);
pub fn key_hash(&self, hash_tag: &[u8], hasher: fn(_: &[u8]) -> u64) -> u64;
pub fn subs(&self) -> Option<Vec<Self>>;
pub fn mark_total(&self, cluster: &str);
pub fn mark_remote(&self, cluster: &str);
pub fn is_done(&self) -> bool;
pub fn is_error(&self) -> bool;
pub fn add_cycle(&self);
pub fn can_cycle(&self) -> bool;
pub fn valid(&self) -> bool;
pub fn set_reply<R: IntoReply<Self::Reply>>(&self, t: R);
pub fn set_error(&self, t: &AsError);
pub fn get_sendtime(&self) -> Option<Instant>; }

Associated Types

type Reply: Clone + IntoReply<Self::Reply> + From<AsError>[src]

type FrontCodec: Decoder<Item = Self, Error = AsError> + Encoder<Item = Self, Error = AsError> + Default + 'static[src]

type BackCodec: Decoder<Item = Self::Reply, Error = AsError> + Encoder<Item = Self, Error = AsError> + Default + 'static[src]

Loading content...

Required methods

pub fn ping_request() -> Self[src]

pub fn reregister(&mut self, task: Task)[src]

pub fn key_hash(&self, hash_tag: &[u8], hasher: fn(_: &[u8]) -> u64) -> u64[src]

pub fn subs(&self) -> Option<Vec<Self>>[src]

pub fn mark_total(&self, cluster: &str)[src]

pub fn mark_remote(&self, cluster: &str)[src]

pub fn is_done(&self) -> bool[src]

pub fn is_error(&self) -> bool[src]

pub fn add_cycle(&self)[src]

pub fn can_cycle(&self) -> bool[src]

pub fn valid(&self) -> bool[src]

pub fn set_reply<R: IntoReply<Self::Reply>>(&self, t: R)[src]

pub fn set_error(&self, t: &AsError)[src]

pub fn get_sendtime(&self) -> Option<Instant>[src]

Loading content...

Implementors

impl Request for libaster::protocol::mc::Cmd[src]

type Reply = Message

type FrontCodec = FrontCodec

type BackCodec = BackCodec

impl Request for libaster::protocol::redis::Cmd[src]

type Reply = Message

type FrontCodec = RedisHandleCodec

type BackCodec = RedisNodeCodec

Loading content...