View Source AhoCorasickNif (aho_corasick_nif v0.1.0-beta.1)
A NIF wrapper for the Rust crate aho-corasick-nif.
This module provides a NIF wrapper for the Rust crate aho-corasick-nif. The NIFs are implemented in Rust and exposed to Elixir via the Rustler library.
Summary
Types
@type t() :: Types.automata()
Functions
@spec find_all(t(), binary()) :: {:ok, [AhoCorasickNif.Native.Match.t()]} | {:error, Types.errors()}
@spec find_all!(t(), binary()) :: [AhoCorasickNif.Native.Match.t()]
@spec find_all_overlapping(t(), binary()) :: {:ok, [AhoCorasickNif.Native.Match.t()]} | {:error, Types.errors()}
@spec find_all_overlapping!(t(), binary()) :: [AhoCorasickNif.Native.Match.t()]
@spec find_first(t(), binary()) :: {:ok, AhoCorasickNif.Native.Match.t() | nil} | {:error, Types.errors()}
@spec new(AhoCorasickNif.Native.BuilderOptions.t(), binary() | [binary()]) :: {:ok, t()} | {:error, Types.errors()}
@spec new!(AhoCorasickNif.Native.BuilderOptions.t(), binary() | [binary()]) :: t()