Trait RequestInput

Source
pub trait RequestInput<TMsg>
where Self: Debug + Send + Sync,
{ // Required methods fn create_request(&self, msg: &TMsg) -> Option<MsgRequest>; fn process_response(&self, msg_response: &MsgResponse) -> Option<Vec<TMsg>>; fn clone_dyn(&self) -> Box<dyn RequestInput<TMsg>>; }
Expand description

Трейт для реализации запросов на основе входящего потока сообщений

Required Methods§

Source

fn create_request(&self, msg: &TMsg) -> Option<MsgRequest>

Создание запроса

Source

fn process_response(&self, msg_response: &MsgResponse) -> Option<Vec<TMsg>>

Обработка ответа

Source

fn clone_dyn(&self) -> Box<dyn RequestInput<TMsg>>

Поддержка клонирования

Trait Implementations§

Source§

impl<TMsg> Clone for Box<dyn RequestInput<TMsg>>

Source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Implementors§

Source§

impl<TMsg, TServerToClient, TClientToServer> RequestInput<TMsg> for RequestInputConfig<TMsg, TServerToClient, TClientToServer>
where TMsg: 'static + MsgDataBound, TClientToServer: 'static + HttpDataBound, TServerToClient: 'static + HttpDataBound,