View Source AhoCorasickNif (aho_corasick_nif v0.1.0-beta.2)

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

Link to this function

add_patterns(automata, binary)

View Source
@spec add_patterns(t(), binary() | [binary()]) :: :ok | {:error, Types.errors()}
Link to this function

add_patterns!(automata, patterns)

View Source
@spec add_patterns!(t(), binary() | [binary()]) :: :ok
Link to this function

find_all(automata, haystack)

View Source
@spec find_all(t(), binary()) ::
  {:ok, [AhoCorasickNif.Native.Match.t()]} | {:error, Types.errors()}
Link to this function

find_all!(automata, haystack)

View Source
@spec find_all!(t(), binary()) :: [AhoCorasickNif.Native.Match.t()]
Link to this function

find_all_overlapping(automata, haystack)

View Source
@spec find_all_overlapping(t(), binary()) ::
  {:ok, [AhoCorasickNif.Native.Match.t()]} | {:error, Types.errors()}
Link to this function

find_all_overlapping!(automata, haystack)

View Source
@spec find_all_overlapping!(t(), binary()) :: [AhoCorasickNif.Native.Match.t()]
Link to this function

find_first(automata, haystack)

View Source
@spec find_first(t(), binary()) ::
  {:ok, AhoCorasickNif.Native.Match.t() | nil} | {:error, Types.errors()}
Link to this function

find_first!(automata, haystack)

View Source
@spec find_first!(t(), binary()) :: AhoCorasickNif.Native.Match.t() | nil
Link to this function

is_match(automata, haystack)

View Source
@spec is_match(t(), binary()) :: {:ok, boolean()} | {:error, Types.errors()}
Link to this function

is_match!(automata, haystack)

View Source
@spec is_match!(t(), binary()) :: boolean()
@spec new(AhoCorasickNif.Native.BuilderOptions.t(), binary() | [binary()]) ::
  {:ok, t()} | {:error, Types.errors()}
Link to this function

remove_patterns(automata, binary)

View Source
@spec remove_patterns(t(), binary() | [binary()]) :: :ok | {:error, Types.errors()}
Link to this function

remove_patterns!(automata, patterns)

View Source
@spec remove_patterns!(t(), binary() | [binary()]) :: :ok
Link to this function

replace_all(automata, haystack, replacements)

View Source
@spec replace_all(t(), binary(), replacements :: [binary()]) ::
  {:ok, binary()} | {:error, Types.errors()}
Link to this function

replace_all!(automata, haystack, replacements)

View Source
@spec replace_all!(t(), binary(), replacements :: [binary()]) :: binary()