diff options
Diffstat (limited to 'src/structured_values/file_name.rs')
-rw-r--r-- | src/structured_values/file_name.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/structured_values/file_name.rs b/src/structured_values/file_name.rs index 32e40dc..0fdac97 100644 --- a/src/structured_values/file_name.rs +++ b/src/structured_values/file_name.rs @@ -4,6 +4,7 @@ use crate::attribute::NtfsAttributeType; use crate::error::{NtfsError, Result}; use crate::file_reference::NtfsFileReference; +use crate::indexes::NtfsIndexEntryKey; use crate::string::NtfsString; use crate::structured_values::{ NtfsFileAttributeFlags, NtfsStructuredValue, NtfsStructuredValueFromSlice, @@ -163,6 +164,13 @@ impl<'s> NtfsStructuredValueFromSlice<'s> for NtfsFileName { } } +// `NtfsFileName` is special in the regard that the index entry key has the same structure as the structured value. +impl NtfsIndexEntryKey for NtfsFileName { + fn key_from_slice(slice: &[u8], position: u64) -> Result<Self> { + Self::from_slice(slice, position) + } +} + #[cfg(test)] mod tests { use super::*; |