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: mod.rs
    path of file: ./repos/vector/src/transforms/tag_cardinality_limit
    
    the code of the file until where you have to start completion: use futures::{Stream, StreamExt};
use hashbrown::HashMap;
use std::{future::ready, pin::Pin};

use crate::transforms::tag_cardinality_limit::config::LimitExceededAction;
use crate::{
    event::Event,
    internal_events::{
        TagCardinalityLimitRejectingEvent, TagCardinalityLimitRejectingTag,
        TagCardinalityValueLimitReached,
    },
    transforms::TaskTransform,
};

mod config;
mod tag_value_set;

#[cfg(test)]
mod tests;

use crate::event::metric::TagValueSet;
pub use config::TagCardinalityLimitConfig;
use tag_value_set::AcceptedTagValueSet;

#[derive(Debug)]
pub struct TagCardinalityLimit {
    config: TagCardinalityLimitConfig,
    accepted_tags: HashMap<String, AcceptedTagValueSet>,
}

impl TagCardinalityLimit {
    fn new(config: TagCardinalityLimitConfig) -> Self {
        Self {
            config,
            accepted_tags: HashMap::new(),
        }
    }

    /// Takes in key and a value corr
    
    fn transform_one(&mut self, mut event: Event) -> Option<Event> {
        let metric = event.as_mut_metric();
        let metric_name = metric.name().to_string();
        if let Some(tags_map) = metric.tags_mut() {
            match self.config.limit_exceeded_action {
                LimitExceededAction::DropEvent => {
                    // This needs to check all the tags, to ensure that the ordering of tag names
                    // doesn't change the behavior of the check.

                    for (key, value) in tags_map.iter_sets() {
                        if self.tag_limit_exceeded(key, value) {
                            emit!(TagCardinalityLimitRejectingEvent {
                                metric_name: &metric_name,
                                tag_key: key,
                                tag_value: &value.to_string(),
                            });
                            return None;
                        }
                    }
                    for (key, value) in tags_map.iter_sets() {
                        self.record_tag_value(key, value);
                    }
                }
                LimitExceededAction::DropTag => {
                    tags_map.retain(|key, value| {
                        if self.try_accept_tag(key, value) {
                            true
                        } else {
                            emit!(TagCardinalityLimitRejectingTag {
                                metric_name: &metric_name,
                                tag_key: key,
                                tag_value: &value.to_string(),
                            });
                            false
                        }
                    });
                }
            }
        }
        Some(event)
    }