fn induct_stream_slices(
        &self,
        mut state: ReplicatedState,
        stream_slices: BTreeMap<SubnetId, StreamSlice>,
    ) -> ReplicatedState {
        let mut subnet_available_memory =
            self.subnet_memory_capacity.get() as i64 - state.total_memory_taken().get() as i64;
        let mut streams = state.take_streams();

        for (remote_subnet_id, mut stream_slice) in stream_slices {
            // Output stream, for resulting signals and (in the initial iteration) reject
            // `Responses`.
            let mut stream = streams.get_mut_or_insert(remote_subnet_id);

            while let Some((stream_index, msg)) = stream_slice.pop_message() {
                self.induct_message(
                    msg,
                    remote_subnet_id,
                    stream_index,
                    &mut state,
                    &mut stream,
                    &mut subnet_available_memory,
                );
            }
        }

        state.put_streams(streams);
        state
    }
/// Inducts the messages in the provided stream slices into the
/// `InductionPool`, generating a signal for each message.
Inducts the messages in the provided stream slices into the
`InductionPool`, generating a signal for each message.
Inducts the messages in the provided stream slices into the ` InductionPool ` generating a signal for each message .
fn induct_stream_slices(
        &self,
        mut state: ReplicatedState,
        stream_slices: BTreeMap<SubnetId, StreamSlice>,
    ) -> ReplicatedState {
        let mut subnet_available_memory =
            self.subnet_memory_capacity.get() as i64 - state.total_memory_taken().get() as i64;
        let mut streams = state.take_streams();
        for (remote_subnet_id, mut stream_slice) in stream_slices {
            // Output stream, for resulting signals and (in the initial iteration) reject
            // `Responses`.
            let mut stream = streams.get_mut_or_insert(remote_subnet_id);
            while let Some((stream_index, msg)) = stream_slice.pop_message() {
                self.induct_message(
                    msg,
                    remote_subnet_id,
                    stream_index,
                    &mut state,
                    &mut stream,
                    &mut subnet_available_memory,
                );
            }
        }
        state.put_streams(streams);
        state
    }
fn induct_stream_slices ( & self , mut state : ReplicatedState , stream_slices : BTreeMap < SubnetId , StreamSlice > , ) -> ReplicatedState { let mut subnet_available_memory = self . subnet_memory_capacity . get ( ) as i64 - state . total_memory_taken ( ) . get ( ) as i64 ; let mut streams = state . take_streams ( ) ; for ( remote_subnet_id , mut stream_slice ) in stream_slices { // Output stream, for resulting signals and (in the initial iteration) reject // `Responses`. let mut stream = streams . get_mut_or_insert ( remote_subnet_id ) ; while let Some ( ( stream_index , msg ) ) = stream_slice . pop_message ( ) { self . induct_message ( msg , remote_subnet_id , stream_index , & mut state , & mut stream , & mut subnet_available_memory , ) ; } } state . put_streams ( streams ) ; state }
Inducts the messages in the provided stream slices into the
`InductionPool`, generating a signal for each message.
Inducts the messages in the provided stream slices into the ` InductionPool ` generating a signal for each message .
&self
state
ReplicatedState
stream_slices
BTreeMap<SubnetId, StreamSlice>
&self
state
ReplicatedState
stream_slices
BTreeMap<SubnetId, StreamSlice>