Struct onig::Syntax
[−]
[src]
pub struct Syntax { /* fields omitted */ }
Onig Syntax Wrapper
Each syntax dfines a flavour of regex syntax. This type allows
interaction with the built-in syntaxes through the static accessor
functions (Syntax::emacs()
, Syntax::default()
etc.) and the
creation of custom syntaxes.
For a demonstration of creating a custom syntax see
examples/syntax.rs
in the main onig repo.
Methods
impl Syntax
[src]
fn asis() -> &'static Syntax
[src]
Plain text syntax
fn posix_basic() -> &'static Syntax
[src]
POSIX Basic RE syntax
fn posix_extended() -> &'static Syntax
[src]
POSIX Extended RE syntax
fn emacs() -> &'static Syntax
[src]
Emacs syntax
fn grep() -> &'static Syntax
[src]
Grep syntax
fn gnu_regex() -> &'static Syntax
[src]
GNU regex syntax
fn java() -> &'static Syntax
[src]
Java (Sun java.util.regex) syntax
fn perl() -> &'static Syntax
[src]
Perl syntax
fn perl_ng() -> &'static Syntax
[src]
Perl + named group syntax
fn ruby() -> &'static Syntax
[src]
Ruby syntax
fn oniguruma() -> &'static Syntax
[src]
Oniguruma Syntax
fn default() -> &'static Syntax
[src]
Default syntax (Ruby syntax)
fn operators(&self) -> SyntaxOperator
[src]
Retrieve the operators for this syntax
fn set_operators(&mut self, operators: SyntaxOperator)
[src]
Replace the operators for this syntax
fn enable_operators(&mut self, operators: SyntaxOperator)
[src]
Enable Operators for this Syntax
Updates the operators for this syntax to enable the chosen ones.
fn disable_operators(&mut self, operators: SyntaxOperator)
[src]
Disable Operators for this Syntax
Updates the operators for this syntax to remove the specified operators.
fn behavior(&self) -> SyntaxBehavior
[src]
Retrieves the syntax behaviours
fn set_behavior(&mut self, behavior: SyntaxBehavior)
[src]
Overwrite the syntax behaviour for this syntax.
fn enable_behavior(&mut self, behavior: SyntaxBehavior)
[src]
Enable a given behaviour for this syntax
fn disable_behavior(&mut self, behavior: SyntaxBehavior)
[src]
Disable a given behaviour for this syntax
fn options(&self) -> RegexOptions
[src]
Retireve the syntax options for this syntax
fn set_options(&mut self, options: RegexOptions)
[src]
Replace the syntax options for this syntax
fn set_meta_char(&mut self, what: MetaCharType, meta: MetaChar)
[src]
Set a given meta character's state
Arguments:
- what
: The meta character to update
- meta
: The value to set the meta character to
Trait Implementations
impl Debug for Syntax
[src]
impl Clone for Syntax
[src]
fn clone(&self) -> Syntax
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more