---
lang: en
title: 'API docs: rest.trie'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.rest.trie.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/rest](./rest.md) &gt; [Trie](./rest.trie.md)

## Trie class

An implementation of trie for routes. The key hierarchy is built with parts of the route path delimited by `/`

<b>Signature:</b>

```typescript
export declare class Trie<T> 
```

## Properties

|  Property | Modifiers | Type | Description |
|  --- | --- | --- | --- |
|  [root](./rest.trie.root.md) |  | <code>Node&lt;T&gt;</code> |  |

## Methods

|  Method | Modifiers | Description |
|  --- | --- | --- |
|  [create(routeTemplate, value)](./rest.trie.create.md) |  | Create a node for a given path template |
|  [list()](./rest.trie.list.md) |  | List all nodes with value of the trie |
|  [match(path)](./rest.trie.match.md) |  | Match a route path against the trie |


