fn call_listeners(
        &self,
        flat_range: Option<&FlatRange>,
        evtfd: Option<&RegionIoEventFd>,
        req_type: ListenerReqType,
    ) -> Result<()> {
        let listeners = self.listeners.lock().unwrap();
        match req_type {
            ListenerReqType::DeleteRegion | ListenerReqType::AddIoeventfd => listeners
                .iter()
                .rev()
                .try_for_each(|ml| ml.handle_request(flat_range, evtfd, req_type)),
            _ => listeners
                .iter()
                .try_for_each(|ml| ml.handle_request(flat_range, evtfd, req_type)),
        }
    }
/// Call listener to deal with the request.
///
/// # Arguments
///
/// * `flat_range` - Available when operating `Region`.
/// * `evtfd` - Available when operating `Ioeventfd`.
/// * `req_type` - One selection of how to operate the `Region` or `Ioeventfd`.
///
/// # Errors
///
/// Return Error if fail to call listener.
Call listener to deal with the request.
Call listener to deal with the request .
fn call_listeners(
        &self,
        flat_range: Option<&FlatRange>,
        evtfd: Option<&RegionIoEventFd>,
        req_type: ListenerReqType,
    ) -> Result<()> {
        let listeners = self.listeners.lock().unwrap();
        match req_type {
            ListenerReqType::DeleteRegion | ListenerReqType::AddIoeventfd => listeners
                .iter()
                .rev()
                .try_for_each(|ml| ml.handle_request(flat_range, evtfd, req_type)),
            _ => listeners
                .iter()
                .try_for_each(|ml| ml.handle_request(flat_range, evtfd, req_type)),
        }
    }
fn call_listeners ( & self , flat_range : Option < & FlatRange > , evtfd : Option < & RegionIoEventFd > , req_type : ListenerReqType , ) -> Result < ( ) > { let listeners = self . listeners . lock ( ) . unwrap ( ) ; match req_type { ListenerReqType :: DeleteRegion | ListenerReqType :: AddIoeventfd => listeners . iter ( ) . rev ( ) . try_for_each ( | ml | ml . handle_request ( flat_range , evtfd , req_type ) ) , _ => listeners . iter ( ) . try_for_each ( | ml | ml . handle_request ( flat_range , evtfd , req_type ) ) , } }
Call listener to deal with the request.
Call listener to deal with the request .
&self
flat_range
Option<&FlatRange>
evtfd
Option<&RegionIoEventFd>
req_type
ListenerReqType
&self
flat_range
Option<&FlatRange>
evtfd
Option<&RegionIoEventFd>
req_type
ListenerReqType
errors
Return Error if fail to call listener.
Return Error if fail to call listener .