[−][src]Struct onig::Syntax
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 crate.
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 Clone for Syntax
[src]
fn clone(&self) -> Syntax
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for Syntax
[src]
impl Debug for Syntax
[src]
Auto Trait Implementations
impl Unpin for Syntax
impl Sync for Syntax
impl Send for Syntax
impl UnwindSafe for Syntax
impl RefUnwindSafe for Syntax
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,