@@ -52,16 +52,34 @@ pub enum ScanError {
5252 Timeout ,
5353 /// Could not open the scanned file.
5454 #[ error( "can not open `{path}`: {source}" ) ]
55- OpenError { path : PathBuf , source : std:: io:: Error } ,
55+ OpenError {
56+ /// Path of the file being scanned.
57+ path : PathBuf ,
58+ /// Error that occurred.
59+ source : std:: io:: Error ,
60+ } ,
5661 /// Could not map the scanned file into memory.
5762 #[ error( "can not map `{path}`: {source}" ) ]
58- MapError { path : PathBuf , source : fmmap:: error:: Error } ,
63+ MapError {
64+ /// Path of the file being scanned.
65+ path : PathBuf ,
66+ /// Error that occurred.
67+ source : fmmap:: error:: Error ,
68+ } ,
5969 /// Could not deserialize the protobuf message for some YARA module.
6070 #[ error( "can not deserialize protobuf message for YARA module `{module}`: {err}" ) ]
61- ProtoError { module : String , err : protobuf:: Error } ,
71+ ProtoError {
72+ /// Module name.
73+ module : String ,
74+ /// Error that occurred
75+ err : protobuf:: Error ,
76+ } ,
6277 /// The module is unknown.
6378 #[ error( "unknown module `{module}`" ) ]
64- UnknownModule { module : String } ,
79+ UnknownModule {
80+ /// Module name.
81+ module : String ,
82+ } ,
6583}
6684
6785/// Global counter that gets incremented every 1 second by a dedicated thread.
0 commit comments