1212// See the License for the specific language governing permissions and
1313// limitations under the License.
1414
15- //! An interface for providing your own [BinaryView]s to Binary Ninja.
15+ //! An interface for providing your own [` BinaryView` ]s to Binary Ninja.
1616
1717use binaryninjacore_sys:: * ;
1818
@@ -33,12 +33,12 @@ use crate::Endianness;
3333use crate :: rc:: * ;
3434use crate :: string:: * ;
3535
36- /// Registers a custom [BinaryViewType] with the core.
36+ /// Registers a custom [` BinaryViewType` ] with the core.
3737///
3838/// The `constructor` is called immediately after successful registration of the type with
39- /// the core. The [BinaryViewType] argument passed to `constructor` is the object that the
40- /// [AsRef<BinaryViewType>]
41- /// implementation of the [CustomBinaryViewType] must return.
39+ /// the core. The [` BinaryViewType` ] argument passed to `constructor` is the object that the
40+ /// [` AsRef<BinaryViewType>` ]
41+ /// implementation of the [` CustomBinaryViewType` ] must return.
4242pub fn register_view_type < S , T , F > ( name : S , long_name : S , constructor : F ) -> & ' static T
4343where
4444 S : BnStrCompatible ,
@@ -364,8 +364,8 @@ pub unsafe trait CustomBinaryView: 'static + BinaryViewBase + Sync + Sized {
364364 fn init ( & mut self , args : Self :: Args ) -> Result < ( ) > ;
365365}
366366
367- /// Represents a partially initialized custom [BinaryView] that should be returned to the core
368- /// from the `create_custom_view` method of a [CustomBinaryViewType].
367+ /// Represents a partially initialized custom [` BinaryView` ] that should be returned to the core
368+ /// from the `create_custom_view` method of a [` CustomBinaryViewType` ].
369369#[ must_use]
370370pub struct CustomView < ' builder > {
371371 // this object can't actually be treated like a real
@@ -380,34 +380,33 @@ impl<'a, T: CustomBinaryViewType> CustomViewBuilder<'a, T> {
380380 /// Begins creating a custom BinaryView.
381381 ///
382382 /// This function may only be called from the `create_custom_view` function of a
383- /// [CustomBinaryViewType].
383+ /// [` CustomBinaryViewType` ].
384384 ///
385385 /// `parent` specifies the view that the core will treat as the parent view, that
386386 /// Segments created against the created view will be backed by `parent`. It will
387- /// usually be (but is not required to be) the `data` argument of the `create_custom_view`
388- /// callback.
387+ /// usually be (but is not required to be) the `data` argument of the
388+ /// [`CustomBinaryViewType::create_custom_view`] callback.
389389 ///
390390 /// `constructor` will not be called until well after the value returned by this function
391- /// has been returned by the [CustomBinaryViewType::create_custom_view] callback to the core,
391+ /// has been returned by the [` CustomBinaryViewType::create_custom_view` ] callback to the core,
392392 /// and may not ever be called if the value returned by this function is dropped or leaked.
393393 ///
394394 /// # Errors
395395 ///
396- /// This function will fail if the [FileMetadata] object associated with the *expected* parent
396+ /// This function will fail if the [`crate::filemetadata:: FileMetadata` ] object associated with the *expected* parent
397397 /// (i.e., the `data` argument passed to the `create_custom_view` function) already has an
398- /// associated [BinaryView] of the same [CustomBinaryViewType]. Multiple [BinaryView] objects
399- /// of the same [BinaryViewType] belonging to the same [FileMetadata] object is prohibited and
398+ /// associated [` BinaryView` ] of the same [` CustomBinaryViewType` ]. Multiple [` BinaryView` ] objects
399+ /// of the same [` BinaryViewType` ] belonging to the same [`crate::filemetadata:: FileMetadata` ] object is prohibited and
400400 /// can cause strange, delayed segmentation faults.
401401 ///
402402 /// # Safety
403403 ///
404404 /// `constructor` should avoid doing anything with the object it returns, especially anything
405- /// that would cause the core to invoke any of the [BinaryViewBase] methods. The core isn't
405+ /// that would cause the core to invoke any of the [` BinaryViewBase` ] methods. The core isn't
406406 /// going to consider the object fully initialized until after that callback has run.
407407 ///
408- /// The [BinaryView] argument passed to the constructor function is the object that is expected
409- /// to be returned by the [AsRef<BinaryView>] implementation required by the [BinaryViewBase] trait.
410- /// TODO FIXME welp this is broke going to need 2 init callbacks
408+ /// The [`BinaryView`] argument passed to the constructor function is the object that is expected
409+ /// to be returned by the [`AsRef<BinaryView>`] implementation required by the [`BinaryViewBase`] trait.
411410 pub fn create < V > ( self , parent : & BinaryView , view_args : V :: Args ) -> Result < CustomView < ' a > >
412411 where
413412 V : CustomBinaryView ,
0 commit comments