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: milestone_key_manager.rs
    path of file: ./repos/bee/bee-protocol/bee-protocol-types/src
    
    the code of the file until where you have to start completion: // Copyright 2020-2022 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

//! A module that provides a milestone key range manager type.

use std::collections::HashSet;

use bee_block::payload::milestone::MilestoneIndex;

use crate::milestone_key_range::Milest
    
    pub fn get_public_keys(&self, index: MilestoneIndex) -> HashSet<String> {
        let mut public_keys = HashSet::with_capacity(self.key_ranges.len());

        for key_range in self.key_ranges.iter() {
            match (key_range.start(), key_range.end()) {
                (s, _) if s > index => break,
                (s, e) if index <= e || s == e => {
                    public_keys.insert(key_range.public_key().clone());
                }
                (_, _) => continue,
            }
        }

        public_keys
    }