Enum hyperscan::error::chimera::ChimeraRuntimeError
source · #[repr(i8)]pub enum ChimeraRuntimeError {
Invalid = -1,
NoMem = -2,
ScanTerminated = -3,
CompilerError = -4,
DbVersionError = -5,
DbPlatformError = -6,
DbModeError = -7,
BadAlign = -8,
BadAlloc = -9,
ScratchInUse = -10,
UnknownError = -13,
FailInternal = -32,
}chimera only.Expand description
Native error code from the underlying chimera library.
Variants§
Invalid = -1
A parameter passed to this function was invalid.
NoMem = -2
A memory allocation failed.
ScanTerminated = -3
The engine was terminated by callback.
This return value indicates that the target buffer was partially
scanned, but that the callback function returned
ChimeraMatchResult::Terminate
after a match was located.
CompilerError = -4
The pattern compiler failed, and the ChimeraInnerCompileError should
be inspected for more detail.
DbVersionError = -5
The given database was built for a different version of the Chimera matcher.
DbPlatformError = -6
The given database was built for a different platform (i.e., CPU type).
DbModeError = -7
The given database was built for a different mode of operation.
This error is returned when streaming calls are used with a non-streaming database and vice versa.
BadAlign = -8
A parameter passed to this function was not correctly aligned.
BadAlloc = -9
The memory allocator did not correctly return memory suitably aligned for the largest representable data type on this platform.
ScratchInUse = -10
The scratch region was already in use.
This error is returned when Chimera is able to detect that the scratch region given is already in use by another Chimera API call.
A separate scratch region, allocated with
ChimeraScratch::setup_for_db()
or ChimeraScratch::try_clone(), is
required for every concurrent caller of the Chimera API.
For example, this error might be returned when
ChimeraScratch::scan_sync()
has been called inside a callback delivered by a currently-executing
ChimeraScratch::scan_sync()
call using the same scratch region.
Note: Not all concurrent uses of scratch regions may be detected. This error is intended as a best-effort debugging tool, not a guarantee.
Note: safe Rust code should never see this error;
Arc::make_mut() is often an effective way
to avoid this while preserving the ergonomics of a Clone and
Send reference type. This approach is used in this library’s
stream module.
UnknownError = -13
Unexpected internal error from Hyperscan.
This error indicates that there was unexpected matching behaviors from Hyperscan. This could be related to invalid usage of scratch space or invalid memory operations by users.
FailInternal = -32
Returned when pcre_exec (called for some expressions internally from
ChimeraScratch::scan_sync())
failed due to a fatal error.
Trait Implementations§
source§impl Clone for ChimeraRuntimeError
impl Clone for ChimeraRuntimeError
source§fn clone(&self) -> ChimeraRuntimeError
fn clone(&self) -> ChimeraRuntimeError
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ChimeraRuntimeError
impl Debug for ChimeraRuntimeError
source§impl Display for ChimeraRuntimeError
impl Display for ChimeraRuntimeError
source§impl Error for ChimeraRuntimeError
impl Error for ChimeraRuntimeError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl From<ChimeraRuntimeError> for ChimeraCompileError
impl From<ChimeraRuntimeError> for ChimeraCompileError
source§fn from(source: ChimeraRuntimeError) -> Self
fn from(source: ChimeraRuntimeError) -> Self
source§impl From<ChimeraRuntimeError> for ChimeraError
impl From<ChimeraRuntimeError> for ChimeraError
source§fn from(source: ChimeraRuntimeError) -> Self
fn from(source: ChimeraRuntimeError) -> Self
source§impl From<ChimeraRuntimeError> for ChimeraScanError
impl From<ChimeraRuntimeError> for ChimeraScanError
source§fn from(source: ChimeraRuntimeError) -> Self
fn from(source: ChimeraRuntimeError) -> Self
source§impl From<ChimeraRuntimeError> for i8
impl From<ChimeraRuntimeError> for i8
source§fn from(enum_value: ChimeraRuntimeError) -> Self
fn from(enum_value: ChimeraRuntimeError) -> Self
source§impl From<i8> for ChimeraRuntimeError
impl From<i8> for ChimeraRuntimeError
source§impl FromPrimitive for ChimeraRuntimeError
impl FromPrimitive for ChimeraRuntimeError
source§impl Hash for ChimeraRuntimeError
impl Hash for ChimeraRuntimeError
source§impl Ord for ChimeraRuntimeError
impl Ord for ChimeraRuntimeError
source§fn cmp(&self, other: &ChimeraRuntimeError) -> Ordering
fn cmp(&self, other: &ChimeraRuntimeError) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for ChimeraRuntimeError
impl PartialEq for ChimeraRuntimeError
source§fn eq(&self, other: &ChimeraRuntimeError) -> bool
fn eq(&self, other: &ChimeraRuntimeError) -> bool
self and other values to be equal, and is used
by ==.source§impl PartialOrd for ChimeraRuntimeError
impl PartialOrd for ChimeraRuntimeError
source§fn partial_cmp(&self, other: &ChimeraRuntimeError) -> Option<Ordering>
fn partial_cmp(&self, other: &ChimeraRuntimeError) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read moreimpl Copy for ChimeraRuntimeError
impl Eq for ChimeraRuntimeError
impl StructuralEq for ChimeraRuntimeError
impl StructuralPartialEq for ChimeraRuntimeError
Auto Trait Implementations§
impl RefUnwindSafe for ChimeraRuntimeError
impl Send for ChimeraRuntimeError
impl Sync for ChimeraRuntimeError
impl Unpin for ChimeraRuntimeError
impl UnwindSafe for ChimeraRuntimeError
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.