diff options
Diffstat (limited to 'rust/src')
| -rw-r--r-- | rust/src/filemetadata.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/rust/src/filemetadata.rs b/rust/src/filemetadata.rs index 036b85b1..5f0be581 100644 --- a/rust/src/filemetadata.rs +++ b/rust/src/filemetadata.rs @@ -109,8 +109,15 @@ impl FileMetadata { } } - pub fn is_database_backed(&self) -> bool { - unsafe { BNIsBackedByDatabase(self.handle) } + pub fn is_database_backed<S: BnStrCompatible>(&self, view_type: S) -> bool { + let view_type = view_type.as_bytes_with_nul(); + + unsafe { + BNIsBackedByDatabase( + self.handle, + view_type.as_ref().as_ptr() as *const _ + ) + } } pub fn begin_undo_actions(&self) { |
