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]
pub fn asis() -> &'static Syntax
[src]
Plain text syntax
pub fn posix_basic() -> &'static Syntax
[src]
POSIX Basic RE syntax
pub fn posix_extended() -> &'static Syntax
[src]
POSIX Extended RE syntax
pub fn emacs() -> &'static Syntax
[src]
Emacs syntax
pub fn grep() -> &'static Syntax
[src]
Grep syntax
pub fn gnu_regex() -> &'static Syntax
[src]
GNU regex syntax
pub fn java() -> &'static Syntax
[src]
Java (Sun java.util.regex) syntax
pub fn perl() -> &'static Syntax
[src]
Perl syntax
pub fn perl_ng() -> &'static Syntax
[src]
Perl + named group syntax
pub fn ruby() -> &'static Syntax
[src]
Ruby syntax
pub fn oniguruma() -> &'static Syntax
[src]
Oniguruma Syntax
pub fn default() -> &'static Syntax
[src]
Default syntax (Ruby syntax)
pub fn operators(&self) -> SyntaxOperator
[src]
Retrieve the operators for this syntax
pub fn set_operators(&mut self, operators: SyntaxOperator)
[src]
Replace the operators for this syntax
pub fn enable_operators(&mut self, operators: SyntaxOperator)
[src]
Enable Operators for this Syntax
Updates the operators for this syntax to enable the chosen ones.
pub fn disable_operators(&mut self, operators: SyntaxOperator)
[src]
Disable Operators for this Syntax
Updates the operators for this syntax to remove the specified operators.
pub fn behavior(&self) -> SyntaxBehavior
[src]
Retrieves the syntax behaviours
pub fn set_behavior(&mut self, behavior: SyntaxBehavior)
[src]
Overwrite the syntax behaviour for this syntax.
pub fn enable_behavior(&mut self, behavior: SyntaxBehavior)
[src]
Enable a given behaviour for this syntax
pub fn disable_behavior(&mut self, behavior: SyntaxBehavior)
[src]
Disable a given behaviour for this syntax
pub fn options(&self) -> RegexOptions
[src]
Retireve the syntax options for this syntax
pub fn set_options(&mut self, options: RegexOptions)
[src]
Replace the syntax options for this syntax
pub fn set_meta_char(&mut self, what: MetaCharType, meta: MetaChar)
[src]
Set a given meta character's state
Arguments:
what
: The meta character to updatemeta
: The value to set the meta character to
Trait Implementations
impl Debug for Syntax
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
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