Trait GetEndpoint

Source
pub trait GetEndpoint<TMsg>
where Self: Debug + Send + Sync,
{ // Required methods fn get_path(&self) -> &str; fn serialize(&self) -> Result<Vec<u8>, Error>; fn fn_input(&mut self, msg: &TMsg); fn clone_dyn(&self) -> Box<dyn GetEndpoint<TMsg>>; }
Expand description

Трейт для обеспечения логики работы отдельной точки GET

В разных точках хранят данные в разных структурах (поле data). Трейт нужен для обработки в массиве

Required Methods§

Source

fn get_path(&self) -> &str

Получить путь для роутера

Source

fn serialize(&self) -> Result<Vec<u8>, Error>

Сериализация данных

Source

fn fn_input(&mut self, msg: &TMsg)

Обновление данных на основе входящих сообщений

Source

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

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

Trait Implementations§

Source§

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

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0§

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

Performs copy-assignment from source. Read more

Implementors§

Source§

impl<TMsg, TServerToClient> GetEndpoint<TMsg> for GetEndpointConfig<TMsg, TServerToClient>
where TMsg: 'static + MsgDataBound, TServerToClient: 'static + Clone + Debug + DeserializeOwned + Serialize + Send + Sync,