refactor: enhance handler traits to support dynamic sizing and improve cancellation handling
This commit is contained in:
@@ -17,14 +17,14 @@ pub trait OnConfigUpdateHandler: Send + Sync + 'static {
|
||||
|
||||
pub struct HandlerImpl<OCH>
|
||||
where
|
||||
OCH: OnConfigUpdateHandler,
|
||||
OCH: OnConfigUpdateHandler + ?Sized,
|
||||
{
|
||||
on_config_update_handler: Arc<OCH>,
|
||||
}
|
||||
|
||||
impl<OCH> HandlerImpl<OCH>
|
||||
where
|
||||
OCH: OnConfigUpdateHandler,
|
||||
OCH: OnConfigUpdateHandler + ?Sized,
|
||||
{
|
||||
pub fn new(on_config_update_handler: Arc<OCH>) -> Self {
|
||||
Self {
|
||||
@@ -36,7 +36,7 @@ where
|
||||
#[async_trait::async_trait]
|
||||
impl<OCH> MasterMessageHandler for HandlerImpl<OCH>
|
||||
where
|
||||
OCH: OnConfigUpdateHandler,
|
||||
OCH: OnConfigUpdateHandler + ?Sized,
|
||||
{
|
||||
async fn handle_master_message(&self, message: MasterMessage) -> MessageResult<()> {
|
||||
match message.payload {
|
||||
|
||||
Reference in New Issue
Block a user