[][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;
    fn ping_request() -> Self;
fn reregister(&mut self, task: Task);
fn key_hash(&self, hash_tag: &[u8], hasher: fn(_: &[u8]) -> u64) -> u64;
fn subs(&self) -> Option<Vec<Self>>;
fn mark_total(&self, cluster: &str);
fn mark_remote(&self, cluster: &str);
fn is_done(&self) -> bool;
fn is_error(&self) -> bool;
fn add_cycle(&self);
fn can_cycle(&self) -> bool;
fn valid(&self) -> bool;
fn set_reply<R: IntoReply<Self::Reply>>(&self, t: R);
fn set_error(&self, t: &AsError); }

Associated Types

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

Loading content...

Required methods

fn ping_request() -> Self

fn reregister(&mut self, task: Task)

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

fn subs(&self) -> Option<Vec<Self>>

fn mark_total(&self, cluster: &str)

fn mark_remote(&self, cluster: &str)

fn is_done(&self) -> bool

fn is_error(&self) -> bool

fn add_cycle(&self)

fn can_cycle(&self) -> bool

fn valid(&self) -> bool

fn set_reply<R: IntoReply<Self::Reply>>(&self, t: R)

fn set_error(&self, t: &AsError)

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...