/// Filter a `StoreEventStream` by subgraph and entity. Only events that have
/// at least one change to one of the given (subgraph, entity) combinations
/// will be delivered by the filtered stream.
Filter a `StoreEventStream` by subgraph and entity. Only events that have
at least one change to one of the given (subgraph, entity) combinations
will be delivered by the filtered stream.
Filter a ` StoreEventStream ` by subgraph and entity . Only events that have at least one change to one of the given ( subgraph entity ) combinations will be delivered by the filtered stream .
pub fn filter_by_entities(self, entities: Vec<SubgraphEntityPair>) -> StoreEventStreamBox {
        let source = self.source.filter(move |event| {
            event.changes.iter().any({
                |change| {
                    entities.iter().any(|(subgraph_id, entity_type)| {
                        subgraph_id == &change.subgraph_id && entity_type == &change.entity_type
                    })
                }
            })
        });
        StoreEventStream::new(Box::new(source))
    }
pub fn filter_by_entities ( self , entities : Vec < SubgraphEntityPair > ) -> StoreEventStreamBox { let source = self . source . filter ( move | event | { event . changes . iter ( ) . any ( { | change | { entities . iter ( ) . any ( | ( subgraph_id , entity_type ) | { subgraph_id == & change . subgraph_id && entity_type == & change . entity_type } ) } } ) } ) ; StoreEventStream :: new ( Box :: new ( source ) ) }
Filter a `StoreEventStream` by subgraph and entity.
Filter a ` StoreEventStream ` by subgraph and entity .
self
entities
Vec<SubgraphEntityPair>