pub fn output_into_iter(
        &mut self,
        owner: CanisterId,
    ) -> impl std::iter::Iterator<Item = (QueueId, QueueIndex, RequestOrResponse)> + '_ {
        self.output_queues
            .iter_mut()
            // Flat map output queues to their contents (prepended with a `QueueId`).
            .flat_map(move |(receiver, queue)| {
                let queue_id = QueueId {
                    dst_canister: *receiver,
                    src_canister: owner,
                    session_id: SessionId::from(0),
                };
                // Zip repeated `queue_id` with message iterator (the output queue).
                std::iter::repeat(queue_id).zip(queue)
            })
            // Remap to a flat tuple.
            .map(|(queue_id, (queue_index, msg))| {
                assert_eq!(queue_id.src_canister, msg.sender());
                (queue_id, queue_index, msg)
            })
    }
/// Returns an iterator that consumes all output messages.
Returns an iterator that consumes all output messages.
Returns an iterator that consumes all output messages .
pub fn output_into_iter(
        &mut self,
        owner: CanisterId,
    ) -> impl std::iter::Iterator<Item = (QueueId, QueueIndex, RequestOrResponse)> + '_ {
        self.output_queues
            .iter_mut()
            // Flat map output queues to their contents (prepended with a `QueueId`).
            .flat_map(move |(receiver, queue)| {
                let queue_id = QueueId {
                    dst_canister: *receiver,
                    src_canister: owner,
                    session_id: SessionId::from(0),
                };
                // Zip repeated `queue_id` with message iterator (the output queue).
                std::iter::repeat(queue_id).zip(queue)
            })
            // Remap to a flat tuple.
            .map(|(queue_id, (queue_index, msg))| {
                assert_eq!(queue_id.src_canister, msg.sender());
                (queue_id, queue_index, msg)
            })
    }
pub fn output_into_iter ( & mut self , owner : CanisterId , ) -> impl std :: iter :: Iterator < Item = ( QueueId , QueueIndex , RequestOrResponse ) > + ' _ { self . output_queues . iter_mut ( ) // Flat map output queues to their contents (prepended with a `QueueId`). . flat_map ( move | ( receiver , queue ) | { let queue_id = QueueId { dst_canister : * receiver , src_canister : owner , session_id : SessionId :: from ( 0 ) , } ; // Zip repeated `queue_id` with message iterator (the output queue). std :: iter :: repeat ( queue_id ) . zip ( queue ) } ) // Remap to a flat tuple. . map ( | ( queue_id , ( queue_index , msg ) ) | { assert_eq ! ( queue_id src_canister msg sender ( ) ) ; ( queue_id , queue_index , msg ) } ) }
Returns an iterator that consumes all output messages.
Returns an iterator that consumes all output messages .
&mut self
owner
CanisterId
&mut self
owner
CanisterId