# `Beaver.MLIR.RewritePattern`

This module defines functions working with MLIR Rewrite Patterns.

# `state`

```elixir
@type state() :: any()
```

# `t`

```elixir
@type t() :: %Beaver.MLIR.RewritePattern{ref: term()}
```

# `construct`
*optional* 

```elixir
@callback construct(state :: state()) :: state()
```

# `destruct`
*optional* 

```elixir
@callback destruct(state :: state()) :: any()
```

# `match_and_rewrite`

```elixir
@callback match_and_rewrite(
  pattern :: t(),
  op :: Beaver.MLIR.Operation.t(),
  rewriter :: Beaver.MLIR.PatternRewriter.t(),
  state :: state()
) :: {:ok, state()} | {:error, state()}
```

# `create`

# `make`

