You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: default.rs
    path of file: ./repos/espanso/espanso-engine/src/funnel
    
    the code of the file until where you have to start completion: /*
 * This file is part of espanso.
 *
 * Copyright (C) 2019-2021 Federico Terzi
 *
 * espanso is free software: you can redistribute it 
    
  fn receive(&self) -> FunnelResult {
    let mut select = Select::new();

    // First register all the sources to the select operation
    for source in self.sources {
      source.register(&mut select);
    }

    // Wait for the first source (blocking operation)
    let op = select.select();
    let source = self
      .sources
      .get(op.index())
      .expect("invalid source index returned by select operation");

    // Receive (and convert) the event
    if let Some(event) = source.receive(op) {
      FunnelResult::Event(event)
    } else {
      FunnelResult::Skipped
    }
  }