hs_expr_info

Struct hs_expr_info 

Source
#[repr(C)]
pub struct hs_expr_info { pub min_width: c_uint, pub max_width: c_uint, pub unordered_matches: c_char, pub matches_at_eod: c_char, pub matches_only_at_eod: c_char, }
Expand description

A type containing information related to an expression that is returned by @ref hs_expression_info() or @ref hs_expression_ext_info.

Fields§

§min_width: c_uint

The minimum length in bytes of a match for the pattern.

Note: in some cases when using advanced features to suppress matches (such as extended parameters or the @ref HS_FLAG_SINGLEMATCH flag) this may represent a conservative lower bound for the true minimum length of a match.

§max_width: c_uint

The maximum length in bytes of a match for the pattern. If the pattern has an unbounded maximum length, this will be set to the maximum value of an unsigned int (UINT_MAX).

Note: in some cases when using advanced features to suppress matches (such as extended parameters or the @ref HS_FLAG_SINGLEMATCH flag) this may represent a conservative upper bound for the true maximum length of a match.

§unordered_matches: c_char

Whether this expression can produce matches that are not returned in order, such as those produced by assertions. Zero if false, non-zero if true.

§matches_at_eod: c_char

Whether this expression can produce matches at end of data (EOD). In streaming mode, EOD matches are raised during @ref hs_close_stream(), since it is only when @ref hs_close_stream() is called that the EOD location is known. Zero if false, non-zero if true.

Note: trailing \b word boundary assertions may also result in EOD matches as end-of-data can act as a word boundary.

§matches_only_at_eod: c_char

Whether this expression can only produce matches at end of data (EOD). In streaming mode, all matches for this expression are raised during @ref hs_close_stream(). Zero if false, non-zero if true.

Trait Implementations§

Source§

impl Clone for hs_expr_info

Source§

fn clone(&self) -> hs_expr_info

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for hs_expr_info

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for hs_expr_info

Source§

fn default() -> hs_expr_info

Returns the “default value” for a type. Read more
Source§

impl PartialEq for hs_expr_info

Source§

fn eq(&self, other: &hs_expr_info) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for hs_expr_info

Source§

impl Eq for hs_expr_info

Source§

impl StructuralPartialEq for hs_expr_info

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.