Checks if the given rule matches with the filter.

        :param rule: The Flask rule to be matched.
        :return: True if the filter matches.

def match(self, rule):
        """
        Checks if the given rule matches with the filter.

        :param rule: The Flask rule to be matched.
        :return: True if the filter matches.
        """
        if self.methods:
            for method in self.methods:
                if method in rule.methods:
                    return True

        if self.endpoints:
            for endpoint in self.endpoints:
                if endpoint == rule.endpoint:
                    return True

        return False