You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// The NTFS file at byte position {position:#x} has no attribute of type {ty:?}, but it was expected
20
+
#[error("The NTFS file at byte position {position:#x} has no attribute of type {ty:?}, but it was expected")]
21
21
AttributeNotFound{
22
22
position:NtfsPosition,
23
23
ty:NtfsAttributeType,
24
24
},
25
-
/// The NTFS Attribute at byte position {position:#x} should have type {expected:?}, but it actually has type {actual:?}
25
+
#[error("The NTFS Attribute at byte position {position:#x} should have type {expected:?}, but it actually has type {actual:?}")]
26
26
AttributeOfDifferentType{
27
27
position:NtfsPosition,
28
28
expected:NtfsAttributeType,
29
29
actual:NtfsAttributeType,
30
30
},
31
-
/// The given buffer should have at least {expected} bytes, but it only has {actual} bytes
31
+
#[error(
32
+
"The given buffer should have at least {expected} bytes, but it only has {actual} bytes"
33
+
)]
32
34
BufferTooSmall{expected:usize,actual:usize},
33
-
/// The NTFS Attribute at byte position {position:#x} has a length of {expected} bytes, but only {actual} bytes are left in the record
35
+
#[error("The NTFS Attribute at byte position {position:#x} has a length of {expected} bytes, but only {actual} bytes are left in the record")]
34
36
InvalidAttributeLength{
35
37
position:NtfsPosition,
36
38
expected:usize,
37
39
actual:usize,
38
40
},
39
-
/// The NTFS Attribute at byte position {position:#x} indicates a name length up to offset {expected}, but the attribute only has a size of {actual} bytes
41
+
#[error("The NTFS Attribute at byte position {position:#x} indicates a name length up to offset {expected}, but the attribute only has a size of {actual} bytes")]
40
42
InvalidAttributeNameLength{
41
43
position:NtfsPosition,
42
44
expected:usize,
43
45
actual:u32,
44
46
},
45
-
/// The NTFS Attribute at byte position {position:#x} indicates that its name starts at offset {expected}, but the attribute only has a size of {actual} bytes
47
+
#[error("The NTFS Attribute at byte position {position:#x} indicates that its name starts at offset {expected}, but the attribute only has a size of {actual} bytes")]
46
48
InvalidAttributeNameOffset{
47
49
position:NtfsPosition,
48
50
expected:u16,
49
51
actual:u32,
50
52
},
51
-
/// The NTFS Data Run header at byte position {position:#x} indicates a maximum byte count of {expected}, but {actual} is the limit
53
+
#[error("The NTFS Data Run header at byte position {position:#x} indicates a maximum byte count of {expected}, but {actual} is the limit")]
52
54
InvalidByteCountInDataRunHeader{
53
55
position:NtfsPosition,
54
56
expected:u8,
55
57
actual:u8,
56
58
},
57
-
/// The cluster count {cluster_count} read from the NTFS Data Run header at byte position {position:#x} is invalid
59
+
#[error("The cluster count {cluster_count} read from the NTFS Data Run header at byte position {position:#x} is invalid")]
58
60
InvalidClusterCountInDataRunHeader{
59
61
position:NtfsPosition,
60
62
cluster_count:u64,
61
63
},
62
-
/// The NTFS File Record at byte position {position:#x} indicates an allocated size of {expected} bytes, but the record only has a size of {actual} bytes
64
+
#[error("The NTFS File Record at byte position {position:#x} indicates an allocated size of {expected} bytes, but the record only has a size of {actual} bytes")]
63
65
InvalidFileAllocatedSize{
64
66
position:NtfsPosition,
65
67
expected:u32,
66
68
actual:u32,
67
69
},
68
-
/// The requested NTFS File Record Number {file_record_number} is invalid
70
+
#[error("The requested NTFS File Record Number {file_record_number} is invalid")]
69
71
InvalidFileRecordNumber{file_record_number:u64},
70
-
/// The NTFS File Record at byte position {position:#x} should have signature {expected:?}, but it has signature {actual:?}
72
+
#[error("The NTFS File Record at byte position {position:#x} should have signature {expected:?}, but it has signature {actual:?}")]
71
73
InvalidFileSignature{
72
74
position:NtfsPosition,
73
75
expected:&'static[u8],
74
76
actual:[u8;4],
75
77
},
76
-
/// The NTFS File Record at byte position {position:#x} indicates a used size of {expected} bytes, but only {actual} bytes are allocated
78
+
#[error("The NTFS File Record at byte position {position:#x} indicates a used size of {expected} bytes, but only {actual} bytes are allocated")]
77
79
InvalidFileUsedSize{
78
80
position:NtfsPosition,
79
81
expected:u32,
80
82
actual:u32,
81
83
},
82
-
/// The NTFS Index Record at byte position {position:#x} indicates an allocated size of {expected} bytes, but the record only has a size of {actual} bytes
84
+
#[error("The NTFS Index Record at byte position {position:#x} indicates an allocated size of {expected} bytes, but the record only has a size of {actual} bytes")]
83
85
InvalidIndexAllocatedSize{
84
86
position:NtfsPosition,
85
87
expected:u32,
86
88
actual:u32,
87
89
},
88
-
/// The NTFS Index Entry at byte position {position:#x} references a data field in the range {range:?}, but the entry only has a size of {size} bytes
90
+
#[error("The NTFS Index Entry at byte position {position:#x} references a data field in the range {range:?}, but the entry only has a size of {size} bytes")]
89
91
InvalidIndexEntryDataRange{
90
92
position:NtfsPosition,
91
93
range:Range<usize>,
92
94
size:u16,
93
95
},
94
-
/// The NTFS Index Entry at byte position {position:#x} reports a size of {expected} bytes, but it only has {actual} bytes
96
+
#[error("The NTFS Index Entry at byte position {position:#x} reports a size of {expected} bytes, but it only has {actual} bytes")]
95
97
InvalidIndexEntrySize{
96
98
position:NtfsPosition,
97
99
expected:u16,
98
100
actual:u16,
99
101
},
100
-
/// The NTFS index root at byte position {position:#x} indicates that its entries start at offset {expected}, but the index root only has a size of {actual} bytes
102
+
#[error("The NTFS index root at byte position {position:#x} indicates that its entries start at offset {expected}, but the index root only has a size of {actual} bytes")]
101
103
InvalidIndexRootEntriesOffset{
102
104
position:NtfsPosition,
103
105
expected:usize,
104
106
actual:usize,
105
107
},
106
-
/// The NTFS index root at byte position {position:#x} indicates a used size up to offset {expected}, but the index root only has a size of {actual} bytes
108
+
#[error("The NTFS index root at byte position {position:#x} indicates a used size up to offset {expected}, but the index root only has a size of {actual} bytes")]
107
109
InvalidIndexRootUsedSize{
108
110
position:NtfsPosition,
109
111
expected:usize,
110
112
actual:usize,
111
113
},
112
-
/// The NTFS Index Record at byte position {position:#x} should have signature {expected:?}, but it has signature {actual:?}
114
+
#[error("The NTFS Index Record at byte position {position:#x} should have signature {expected:?}, but it has signature {actual:?}")]
113
115
InvalidIndexSignature{
114
116
position:NtfsPosition,
115
117
expected:&'static[u8],
116
118
actual:[u8;4],
117
119
},
118
-
/// The NTFS Index Record at byte position {position:#x} indicates a used size of {expected} bytes, but only {actual} bytes are allocated
120
+
#[error("The NTFS Index Record at byte position {position:#x} indicates a used size of {expected} bytes, but only {actual} bytes are allocated")]
119
121
InvalidIndexUsedSize{
120
122
position:NtfsPosition,
121
123
expected:u32,
122
124
actual:u32,
123
125
},
124
-
/// The MFT LCN in the BIOS Parameter Block of the NTFS filesystem is invalid.
126
+
#[error("The MFT LCN in the BIOS Parameter Block of the NTFS filesystem is invalid.")]
125
127
InvalidMftLcn,
126
-
/// The NTFS Non Resident Value Data at byte position {position:#x} references a data field in the range {range:?}, but the entry only has a size of {size} bytes
128
+
#[error("The NTFS Non Resident Value Data at byte position {position:#x} references a data field in the range {range:?}, but the entry only has a size of {size} bytes")]
127
129
InvalidNonResidentValueDataRange{
128
130
position:NtfsPosition,
129
131
range:Range<usize>,
130
132
size:usize,
131
133
},
132
-
/// The resident NTFS Attribute at byte position {position:#x} indicates a value length of {length} starting at offset {offset}, but the attribute only has a size of {actual} bytes
134
+
#[error("The resident NTFS Attribute at byte position {position:#x} indicates a value length of {length} starting at offset {offset}, but the attribute only has a size of {actual} bytes")]
133
135
InvalidResidentAttributeValueLength{
134
136
position:NtfsPosition,
135
137
length:u32,
136
138
offset:u16,
137
139
actual:u32,
138
140
},
139
-
/// The resident NTFS Attribute at byte position {position:#x} indicates that its value starts at offset {expected}, but the attribute only has a size of {actual} bytes
141
+
#[error("The resident NTFS Attribute at byte position {position:#x} indicates that its value starts at offset {expected}, but the attribute only has a size of {actual} bytes")]
140
142
InvalidResidentAttributeValueOffset{
141
143
position:NtfsPosition,
142
144
expected:u16,
143
145
actual:u32,
144
146
},
145
-
/// A record size field in the BIOS Parameter Block denotes {size_info}, which is invalid considering the cluster size of {cluster_size} bytes
147
+
#[error("A record size field in the BIOS Parameter Block denotes {size_info}, which is invalid considering the cluster size of {cluster_size} bytes")]
/// The sectors per cluster field in the BIOS Parameter Block denotes {sectors_per_cluster:#04x}, which is invalid
149
+
#[error("The sectors per cluster field in the BIOS Parameter Block denotes {sectors_per_cluster:#04x}, which is invalid")]
148
150
InvalidSectorsPerCluster{sectors_per_cluster:u8},
149
-
/// The NTFS structured value at byte position {position:#x} of type {ty:?} has {actual} bytes where {expected} bytes were expected
151
+
#[error("The NTFS structured value at byte position {position:#x} of type {ty:?} has {actual} bytes where {expected} bytes were expected")]
150
152
InvalidStructuredValueSize{
151
153
position:NtfsPosition,
152
154
ty:NtfsAttributeType,
153
155
expected:u64,
154
156
actual:u64,
155
157
},
156
-
/// The given time can't be represented as an NtfsTime
158
+
#[error("The given time can't be represented as an NtfsTime")]
157
159
InvalidTime,
158
-
/// The 2-byte signature field at byte position {position:#x} should contain {expected:?}, but it contains {actual:?}
160
+
#[error("The 2-byte signature field at byte position {position:#x} should contain {expected:?}, but it contains {actual:?}")]
159
161
InvalidTwoByteSignature{
160
162
position:NtfsPosition,
161
163
expected:&'static[u8],
162
164
actual:[u8;2],
163
165
},
164
-
/// The Upcase Table should have a size of {expected} bytes, but it has {actual} bytes
166
+
#[error("The Upcase Table should have a size of {expected} bytes, but it has {actual} bytes")]
165
167
InvalidUpcaseTableSize{expected:u64,actual:u64},
166
-
/// The NTFS Update Sequence Count of the record at byte position {position:#x} has the invalid value {update_sequence_count}
168
+
#[error("The NTFS Update Sequence Count of the record at byte position {position:#x} has the invalid value {update_sequence_count}")]
167
169
InvalidUpdateSequenceCount{
168
170
position:NtfsPosition,
169
171
update_sequence_count:u16,
170
172
},
171
-
/// The NTFS Update Sequence Number of the record at byte position {position:#x} references a data field in the range {range:?}, but the entry only has a size of {size} bytes
173
+
#[error("The NTFS Update Sequence Number of the record at byte position {position:#x} references a data field in the range {range:?}, but the entry only has a size of {size} bytes")]
172
174
InvalidUpdateSequenceNumberRange{
173
175
position:NtfsPosition,
174
176
range:Range<usize>,
175
177
size:usize,
176
178
},
177
-
/// The VCN {vcn} read from the NTFS Data Run header at byte position {position:#x} cannot be added to the LCN {previous_lcn} calculated from previous data runs
179
+
#[error("The VCN {vcn} read from the NTFS Data Run header at byte position {position:#x} cannot be added to the LCN {previous_lcn} calculated from previous data runs")]
178
180
InvalidVcnInDataRunHeader{
179
181
position:NtfsPosition,
180
182
vcn:Vcn,
181
183
previous_lcn:Lcn,
182
184
},
183
-
/// I/O error: {0:?}
185
+
#[error("I/O error: {0:?}")]
184
186
Io(io::Error),
185
-
/// The Logical Cluster Number (LCN) {lcn} is too big to be multiplied by the cluster size
187
+
#[error(
188
+
"The Logical Cluster Number (LCN) {lcn} is too big to be multiplied by the cluster size"
189
+
)]
186
190
LcnTooBig{lcn:Lcn},
187
-
/// The index root at byte position {position:#x} is a large index, but no matching index allocation attribute was provided
191
+
#[error("The index root at byte position {position:#x} is a large index, but no matching index allocation attribute was provided")]
188
192
MissingIndexAllocation{position:NtfsPosition},
189
-
/// The NTFS file at byte position {position:#x} is not a directory
193
+
#[error("The NTFS file at byte position {position:#x} is not a directory")]
190
194
NotADirectory{position:NtfsPosition},
191
-
/// The total sector count {total_sectors} is too big to be multiplied by the sector size
195
+
#[error(
196
+
"The total sector count {total_sectors} is too big to be multiplied by the sector size"
197
+
)]
192
198
TotalSectorsTooBig{total_sectors:u64},
193
-
/// The NTFS Attribute at byte position {position:#x} should not belong to an Attribute List, but it does
199
+
#[error("The NTFS Attribute at byte position {position:#x} should not belong to an Attribute List, but it does")]
/// The Update Sequence Array (USA) of the record at byte position {position:#x} has entries for {array_count} blocks of 512 bytes, but the record is only {record_size} bytes long
213
+
#[error("The Update Sequence Array (USA) of the record at byte position {position:#x} has entries for {array_count} blocks of 512 bytes, but the record is only {record_size} bytes long")]
208
214
UpdateSequenceArrayExceedsRecordSize{
209
215
position:NtfsPosition,
210
216
array_count:u16,
211
217
record_size:usize,
212
218
},
213
-
/// Sector corruption: The 2 bytes at byte position {position:#x} should match the Update Sequence Number (USN) {expected:?}, but they are {actual:?}
219
+
#[error("Sector corruption: The 2 bytes at byte position {position:#x} should match the Update Sequence Number (USN) {expected:?}, but they are {actual:?}")]
214
220
UpdateSequenceNumberMismatch{
215
221
position:NtfsPosition,
216
222
expected:[u8;2],
217
223
actual:[u8;2],
218
224
},
219
-
/// The index allocation at byte position {position:#x} references a Virtual Cluster Number (VCN) {expected}, but a record with VCN {actual} is found at that offset
225
+
#[error("The index allocation at byte position {position:#x} references a Virtual Cluster Number (VCN) {expected}, but a record with VCN {actual} is found at that offset")]
220
226
VcnMismatchInIndexAllocation{
221
227
position:NtfsPosition,
222
228
expected:Vcn,
223
229
actual:Vcn,
224
230
},
225
-
/// The index allocation at byte position {position:#x} references a Virtual Cluster Number (VCN) {vcn}, but this VCN exceeds the boundaries of the filesystem
231
+
#[error("The index allocation at byte position {position:#x} references a Virtual Cluster Number (VCN) {vcn}, but this VCN exceeds the boundaries of the filesystem")]
0 commit comments