Trait RequestPeriodic

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

Трейт для реализации периодических запросов

Required Methods§

Source

fn create_request(&self) -> Option<MsgRequest>

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

Source

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

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

Source

fn get_period(&self) -> Duration

Получить периодичность вызова

Source

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

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

Trait Implementations§

Source§

impl<TMsg> Clone for Box<dyn RequestPeriodic<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> RequestPeriodic<TMsg> for RequestPeriodicConfig<TMsg, TServerToClient, TClientToServer>
where TMsg: 'static + MsgDataBound, TClientToServer: 'static + HttpDataBound, TServerToClient: 'static + HttpDataBound,