memscope_rs/error/
types.rs1pub use crate::core::error::MemScopeError;
7pub use crate::core::error::Result as MemScopeResult;
8
9pub struct ErrorUtils;
11
12impl ErrorUtils {
13 pub fn memory_error(operation: &str) -> MemScopeError {
15 crate::core::error::MemScopeError::memory(
16 crate::core::error::MemoryOperation::Tracking,
17 operation,
18 )
19 }
20
21 pub fn config_error(component: &str, message: &str) -> MemScopeError {
23 crate::core::error::MemScopeError::config(component, message)
24 }
25
26 pub fn system_error(message: &str) -> MemScopeError {
28 crate::core::error::MemScopeError::system(crate::core::error::SystemErrorType::Io, message)
29 }
30
31 pub fn analysis_error(analyzer: &str, message: &str) -> MemScopeError {
33 crate::core::error::MemScopeError::analysis(analyzer, message)
34 }
35
36 pub fn export_error(format: &str, message: &str) -> MemScopeError {
38 crate::core::error::MemScopeError::export(format, message)
39 }
40
41 pub fn internal_error(message: &str) -> MemScopeError {
43 crate::core::error::MemScopeError::internal(message)
44 }
45}