DatabaseBuilder

Trait DatabaseBuilder 

Source
pub trait DatabaseBuilder {
    type Err;

    // Required method
    fn for_platform<T: Mode>(
        &self,
        platform: Option<&PlatformRef>,
    ) -> Result<Database<T>, Self::Err>;

    // Provided method
    fn build<T: Mode>(&self) -> Result<Database<T>, Self::Err> { ... }
}
Expand description

The regular expression pattern database builder.

Required Associated Types§

Source

type Err

The associated error which can be returned from compiling.

Required Methods§

Source

fn for_platform<T: Mode>( &self, platform: Option<&PlatformRef>, ) -> Result<Database<T>, Self::Err>

Build an expression is compiled into a Hyperscan database for a target platform.

Provided Methods§

Source

fn build<T: Mode>(&self) -> Result<Database<T>, Self::Err>

Build an expression is compiled into a Hyperscan database which can be passed to the runtime functions

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Builder for Literal

Available on crate feature literal only.
Source§

impl Builder for Literals

Available on crate feature literal only.
Source§

impl Builder for Pattern

Source§

impl Builder for Patterns

Source§

impl<S> Builder for S
where S: AsRef<str>,