fn handle_notify_multi_inner(
        &mut self,
        input: actor::NotifyMulti,
    ) -> KitsuneP2pHandlerResult<u8> {
        let actor::NotifyMulti {
            space,
            from_agent,
            basis,
            remote_agent_count,
            timeout_ms,
            payload,
        } = input;

        let remote_agent_count = remote_agent_count.expect("set by handle_notify_multi");
        let timeout_ms = timeout_ms.expect("set by handle_notify_multi");
        let stage_1_timeout_ms = timeout_ms / 2;

        // as an optimization - broadcast to all local joins
        // but don't count that toward our publish total
        let local_all = self
            .local_joined_agents
            .iter()
            .map(|agent| {
                self.evt_sender.notify(
                    space.clone(),
                    agent.clone(),
                    from_agent.clone(),
                    payload.clone(),
                )
            })
            .collect::<Vec<_>>();

        let remote_fut = discover::message_neighborhood(
            self,
            from_agent.clone(),
            remote_agent_count,
            stage_1_timeout_ms,
            timeout_ms,
            basis,
            wire::Wire::notify(
                space.clone(),
                from_agent.clone(),
                from_agent,
                payload.into(),
            ),
            |_, w| match w {
                wire::Wire::NotifyResp(_) => Ok(()),
                _ => Err(()),
            },
        );

        Ok(async move {
            futures::future::try_join_all(local_all).await?;

            Ok(remote_fut.await.len() as u8)
        }
        .boxed()
        .into())
    }
/// actual logic for handle_notify_multi ...
/// the top-level handler may or may not spawn a task for this
actual logic for handle_notify_multi
the top-level handler may or may not spawn a task for this
actual logic for handle_notify_multi the top - level handler may or may not spawn a task for this
fn handle_notify_multi_inner(
        &mut self,
        input: actor::NotifyMulti,
    ) -> KitsuneP2pHandlerResult<u8> {
        let actor::NotifyMulti {
            space,
            from_agent,
            basis,
            remote_agent_count,
            timeout_ms,
            payload,
        } = input;
        let remote_agent_count = remote_agent_count.expect("set by handle_notify_multi");
        let timeout_ms = timeout_ms.expect("set by handle_notify_multi");
        let stage_1_timeout_ms = timeout_ms / 2;
        // as an optimization - broadcast to all local joins
        // but don't count that toward our publish total
        let local_all = self
            .local_joined_agents
            .iter()
            .map(|agent| {
                self.evt_sender.notify(
                    space.clone(),
                    agent.clone(),
                    from_agent.clone(),
                    payload.clone(),
                )
            })
            .collect::<Vec<_>>();
        let remote_fut = discover::message_neighborhood(
            self,
            from_agent.clone(),
            remote_agent_count,
            stage_1_timeout_ms,
            timeout_ms,
            basis,
            wire::Wire::notify(
                space.clone(),
                from_agent.clone(),
                from_agent,
                payload.into(),
            ),
            |_, w| match w {
                wire::Wire::NotifyResp(_) => Ok(()),
                _ => Err(()),
            },
        );
        Ok(async move {
            futures::future::try_join_all(local_all).await?;
            Ok(remote_fut.await.len() as u8)
        }
        .boxed()
        .into())
    }
fn handle_notify_multi_inner ( & mut self , input : actor :: NotifyMulti , ) -> KitsuneP2pHandlerResult < u8 > { let actor :: NotifyMulti { space , from_agent , basis , remote_agent_count , timeout_ms , payload , } = input ; let remote_agent_count = remote_agent_count . expect ( " " ) ; let timeout_ms = timeout_ms . expect ( " " ) ; let stage_1_timeout_ms = timeout_ms / 2 ; // as an optimization - broadcast to all local joins // but don't count that toward our publish total let local_all = self . local_joined_agents . iter ( ) . map ( | agent | { self . evt_sender . notify ( space . clone ( ) , agent . clone ( ) , from_agent . clone ( ) , payload . clone ( ) , ) } ) . collect :: < Vec < _ > > ( ) ; let remote_fut = discover :: message_neighborhood ( self , from_agent . clone ( ) , remote_agent_count , stage_1_timeout_ms , timeout_ms , basis , wire :: Wire :: notify ( space . clone ( ) , from_agent . clone ( ) , from_agent , payload . into ( ) , ) , | _ , w | match w { wire :: Wire :: NotifyResp ( _ ) => Ok ( ( ) ) , _ => Err ( ( ) ) , } , ) ; Ok ( async move { futures :: future :: try_join_all ( local_all ) . await ? ; Ok ( remote_fut . await . len ( ) as u8 ) } . boxed ( ) . into ( ) ) }
actual logic for handle_notify_multi ...
the top-level handler may or may not spawn a task for this
actual logic for handle_notify_multi ... the top - level handler may or may not spawn a task for this
&mut self
input
actor::NotifyMulti
&mut self
input
actor::NotifyMulti