Trait artichoke::prelude::Regexp[][src]

pub trait Regexp {
    type Error;
    fn active_regexp_globals(&self) -> Result<usize, Self::Error>;
fn set_active_regexp_globals(
        &mut self,
        count: usize
    ) -> Result<(), Self::Error>;
fn clear_regexp(&mut self) -> Result<(), Self::Error>; }

Track the state of Regexp globals and global interpreter state.

Associated Types

type Error[src]

Concrete error type for errors encountered when manipulating Regexp state.

Loading content...

Required methods

fn active_regexp_globals(&self) -> Result<usize, Self::Error>[src]

Retrieve the current number of set Regexp global variables.

Regexp global variables like $1 and $7 are defined after certain Regexp matching methods for each capturing group in the regular expression.

Errors

If the Regexp state is inaccessible, an error is returned.

fn set_active_regexp_globals(&mut self, count: usize) -> Result<(), Self::Error>[src]

Set the current number of set Regexp global variables.

Regexp global variables like $1 and $7 are defined after certain Regexp matching methods for each capturing group in the regular expression.

Errors

If the Regexp state is inaccessible, an error is returned.

fn clear_regexp(&mut self) -> Result<(), Self::Error>[src]

Clear all Regexp state.

Errors

If the Regexp state is inaccessible, an error is returned.

Loading content...

Implementors

impl Regexp for Artichoke[src]

type Error = InterpreterExtractError

pub fn active_regexp_globals(
    &self
) -> Result<usize, <Artichoke as Regexp>::Error>
[src]

pub fn set_active_regexp_globals(
    &mut self,
    count: usize
) -> Result<(), <Artichoke as Regexp>::Error>
[src]

pub fn clear_regexp(&mut self) -> Result<(), <Artichoke as Regexp>::Error>[src]

Loading content...