libaster::proxy::standalone

Trait Request

Source
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;

Show 14 methods // 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); fn get_sendtime(&self) -> Option<Instant>;
}

Required Associated Types§

Source

type Reply: Clone + IntoReply<Self::Reply> + From<AsError>

Source

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

Source

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

Required Methods§

Source

fn ping_request() -> Self

Source

fn reregister(&mut self, task: Task)

Source

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

Source

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

Source

fn mark_total(&self, cluster: &str)

Source

fn mark_remote(&self, cluster: &str)

Source

fn is_done(&self) -> bool

Source

fn is_error(&self) -> bool

Source

fn add_cycle(&self)

Source

fn can_cycle(&self) -> bool

Source

fn valid(&self) -> bool

Source

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

Source

fn set_error(&self, t: &AsError)

Source

fn get_sendtime(&self) -> Option<Instant>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§