diff options
| author | Mason Reed <mason@vector35.com> | 2026-02-17 20:16:39 -0800 |
|---|---|---|
| committer | Mason Reed <35282038+emesare@users.noreply.github.com> | 2026-02-23 00:09:44 -0800 |
| commit | 837f8590be80b7c98162e70e4f0c1814b83e9d7b (patch) | |
| tree | c3355c31839acf9cbe3148579be1a0685ddce91f /rust/src/types | |
| parent | b765ffd736ecbfbb7c19b7e166a021ac46a9eeb8 (diff) | |
[Rust] Misc documentation cleanup
Diffstat (limited to 'rust/src/types')
| -rw-r--r-- | rust/src/types/library.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/rust/src/types/library.rs b/rust/src/types/library.rs index 3dd353f7..f6415dc4 100644 --- a/rust/src/types/library.rs +++ b/rust/src/types/library.rs @@ -17,6 +17,8 @@ use std::ptr::NonNull; // Used for doc comments #[allow(unused_imports)] use crate::binary_view::BinaryView; +#[allow(unused_imports)] +use crate::binary_view::BinaryViewExt; // TODO: Introduce a FinalizedTypeLibrary that cannot be mutated, so we do not have APIs that are unusable. @@ -255,7 +257,7 @@ impl TypeLibrary { /// Referenced types will not automatically be added, so make sure to add referenced types to the /// library or use [`TypeLibrary::add_type_source`] to mark the references originating source. /// - /// To add objects from a binary view, prefer using [`BinaryView::export_object_to_library`] which + /// To add objects from a binary view, prefer using [`BinaryViewExt::export_object_to_library`] which /// will automatically pull in all referenced types and record additional dependencies as needed. pub fn add_named_object(&self, name: QualifiedName, type_: &Type) { let mut raw_name = QualifiedName::into_raw(name); @@ -274,7 +276,7 @@ impl TypeLibrary { /// Referenced types will not automatically be added, so make sure to add referenced types to the /// library or use [`TypeLibrary::add_type_source`] to mark the references originating source. /// - /// To add types from a binary view, prefer using [`BinaryView::export_type_to_library`] which + /// To add types from a binary view, prefer using [`BinaryViewExt::export_type_to_library`] which /// will automatically pull in all referenced types and record additional dependencies as needed. pub fn add_named_type(&self, name: QualifiedName, type_: &Type) { let mut raw_name = QualifiedName::into_raw(name); @@ -314,7 +316,7 @@ impl TypeLibrary { /// Get the object (function) associated with the given name, if any. /// - /// Prefer [`BinaryView::import_type_library_object`] as it will recursively import types required. + /// Prefer [`BinaryViewExt::import_type_library_object`] as it will recursively import types required. pub fn get_named_object(&self, name: QualifiedName) -> Option<Ref<Type>> { let mut raw_name = QualifiedName::into_raw(name); let t = unsafe { BNGetTypeLibraryNamedObject(self.as_raw(), &mut raw_name) }; @@ -324,7 +326,7 @@ impl TypeLibrary { /// Get the type associated with the given name, if any. /// - /// Prefer [`BinaryView::import_type_library_type`] as it will recursively import types required. + /// Prefer [`BinaryViewExt::import_type_library_type`] as it will recursively import types required. pub fn get_named_type(&self, name: QualifiedName) -> Option<Ref<Type>> { let mut raw_name = QualifiedName::into_raw(name); let t = unsafe { BNGetTypeLibraryNamedType(self.as_raw(), &mut raw_name) }; |
