Module: Sanscript::Detect::Rust

Defined in:
lib/sanscript/detect/rust.rb

Overview

Module stub for implementing ‘detect_scheme` method using Rust native extension. (Note: This module will only exist if the native extension is available and Sanscript.load_rust! has been run.)

Instance Method Summary collapse

Instance Method Details

#rust_detect_scheme(text) ⇒ Symbol?

Attempts to detect the encoding scheme of the provided string. Uses Rust native extension for vastly increased performance.

Parameters:

  • text (String)

    a string of Sanskrit text

Returns:

  • (Symbol, nil)

    the Symbol of the scheme, or nil if no match



# File 'lib/sanscript/detect/rust.rb', line 8