Crate ncp_engine

Crate ncp_engine 

Source
Expand description

§Nucleo-picker-engine

The ncp-engine crate is a fork of the nucleo crate. It is not recommended for general use. This fork mainly exists to meet the specific requirements of nucleo-picker.

ncp-engine implements a high level matcher API that provides a performant parallel matcher worker threadpool. It is designed to allow integrating a fzf-like fuzzy matcher into a TUI application.

For a fully-featured TUI implementation, see nucleo-picker.

Matching runs in a background threadpool while providing a snapshot of the last complete match on request. That means the matcher can update the results live while the user is typing, while never blocking the main UI thread (beyond a user provided timeout). Nucleo also supports fully concurrent lock-free (and wait-free) streaming of input items.

The Nucleo struct serves as the main API entrypoint for this crate.

Modules§

chars
Utilities for working with (Unicode) characters and codepoints.
pattern
Patterns to prescribe matching behaviour.

Structs§

Config
Configuration data that controls matcher behaviour.
Injector
A handle that allows adding new items to a Nucleo worker.
Item
A match candidate stored in a Nucleo worker.
Match
A successful match computed by the Nucleo match.
MatchListConfig
Configuration which influences the match list.
Matcher
A matcher engine that can execute (fuzzy) matches.
Nucleo
A high level matcher worker that quickly computes matches in a background threadpool.
Snapshot
A representation of the results of a Nucleo worker after finishing a tick.
Status
The status of a Nucleo worker after a match.

Enums§

Utf32Str
A UTF-32 encoded (char array) string that is used as an input to (fuzzy) matching.
Utf32String
An owned version of Utf32Str.