pub struct DbInfo(/* private fields */);Implementations§
source§impl DbInfo
impl DbInfo
pub fn as_str(&self) -> &str
pub fn as_mut_str(&mut self) -> &mut str
sourcepub fn extract_db_info(db: &Database) -> Result<Self, HyperscanRuntimeError>
pub fn extract_db_info(db: &Database) -> Result<Self, HyperscanRuntimeError>
#[cfg(feature = "compiler")]
fn main() -> Result<(), hyperscan::error::HyperscanError> {
use hyperscan::{expression::*, flags::*, database::*};
let expr: Expression = "a+".parse()?;
let db = expr.compile(Flags::UTF8, Mode::BLOCK)?;
let info = DbInfo::extract_db_info(&db)?;
assert_eq!(info.as_str(), "Version: 5.4.2 Features: AVX2 Mode: BLOCK");
Ok(())
}Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for DbInfo
impl Send for DbInfo
impl Sync for DbInfo
impl Unpin for DbInfo
impl UnwindSafe for DbInfo
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more