pub fn listen(&mut self, filter_keys: Option<&[StorageKey]>) -> StorageEventStream<Block::Hash> {
		self.next_id += 1;

		// add subscriber for every key
		let keys = match filter_keys {
			None => {
				self.wildcard_listeners.insert(self.next_id);
				None
			},
			Some(keys) => Some(keys.iter().map(|key| {
				self.listeners
					.entry(key.clone())
					.or_insert_with(Default::default)
					.insert(self.next_id);
				key.clone()
			}).collect())
		};

		// insert sink
		let (tx, rx) = mpsc::unbounded();
		self.sinks.insert(self.next_id, (tx, keys));
		rx
	}
/// Start listening for particular storage keys.
Start listening for particular storage keys.
Start listening for particular storage keys .
pub fn listen(&mut self, filter_keys: Option<&[StorageKey]>) -> StorageEventStream<Block::Hash> {
		self.next_id += 1;
		// add subscriber for every key
		let keys = match filter_keys {
			None => {
				self.wildcard_listeners.insert(self.next_id);
				None
			},
			Some(keys) => Some(keys.iter().map(|key| {
				self.listeners
					.entry(key.clone())
					.or_insert_with(Default::default)
					.insert(self.next_id);
				key.clone()
			}).collect())
		};
		// insert sink
		let (tx, rx) = mpsc::unbounded();
		self.sinks.insert(self.next_id, (tx, keys));
		rx
	}
pub fn listen ( & mut self , filter_keys : Option < & [ StorageKey ] > ) -> StorageEventStream < Block :: Hash > { self . next_id += 1 ; // add subscriber for every key let keys = match filter_keys { None => { self . wildcard_listeners . insert ( self . next_id ) ; None } , Some ( keys ) => Some ( keys . iter ( ) . map ( | key | { self . listeners . entry ( key . clone ( ) ) . or_insert_with ( Default :: default ) . insert ( self . next_id ) ; key . clone ( ) } ) . collect ( ) ) } ; // insert sink let ( tx , rx ) = mpsc :: unbounded ( ) ; self . sinks . insert ( self . next_id , ( tx , keys ) ) ; rx }
Start listening for particular storage keys.
Start listening for particular storage keys .
&mut self
filter_keys
Option<&[StorageKey]>
&mut self
filter_keys
Option<&[StorageKey]>