def match(self, request, *, root=None, path=None, methods=None):
match = Match()<EOL>if path is not None:<EOL><INDENT>pattern = self.__get_pattern(path)<EOL>match = pattern.match(request.path)<EOL><DEDENT>elif root is not None:<EOL><INDENT>pattern = self.__get_pattern(root)<EOL>match = pattern.match(request.path, left=True)<EOL><DEDENT>if not match:<EOL><INDENT>return None<EOL><DEDENT>if methods:<EOL><INDENT>methods = map(str.upper, methods)<EOL>if request.method not in methods:<EOL><INDENT>return None<EOL><DEDENT><DEDENT>return match<EOL>
Return match or None for the request/constraints pair.

        Parameters
        ----------
        request: :class:`.http.Request`
            Request instance.
        root: str
            HTTP path root.
        path: str
            HTTP path.
        methods: list
            HTTP methods.

        Returns
        -------
        :class:`.Match`/None
            Match instance (True) or None (False).