pub trait RequestPeriodic<TMsg>{
    // 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§
Sourcefn create_request(&self) -> Option<MsgRequest>
 
fn create_request(&self) -> Option<MsgRequest>
Создание запроса
Sourcefn process_response(&self, msg_response: &MsgResponse) -> Option<Vec<TMsg>>
 
fn process_response(&self, msg_response: &MsgResponse) -> Option<Vec<TMsg>>
Обработка ответа
Sourcefn get_period(&self) -> Duration
 
fn get_period(&self) -> Duration
Получить периодичность вызова
Sourcefn clone_dyn(&self) -> Box<dyn RequestPeriodic<TMsg>>
 
fn clone_dyn(&self) -> Box<dyn RequestPeriodic<TMsg>>
Поддержка клонирования