Fixed all documentation errors.

Renamed some errors to their function's name.
This commit is contained in:
2021-04-10 05:41:58 +01:00
parent 64aacedaf6
commit 991fa6ecce
20 changed files with 42 additions and 38 deletions

View File

@@ -27,19 +27,19 @@ impl DataKind {
Self::Heuristics
}
/// Returns `true` if the data kind is [`Known`].
/// Returns `true` if the data kind is [`Known`](Self::Known).
#[must_use]
pub const fn is_known(self) -> bool {
matches!(self, Self::Known)
}
/// Returns `true` if the data kind is [`Foreign`].
/// Returns `true` if the data kind is [`Foreign`](Self::Foreign).
#[must_use]
pub const fn is_foreign(self) -> bool {
matches!(self, Self::Foreign)
}
/// Returns `true` if the data kind is [`Heuristics`].
/// Returns `true` if the data kind is [`Heuristics`](Self::Heuristics).
#[must_use]
pub const fn is_heuristics(self) -> bool {
matches!(self, Self::Heuristics)

View File

@@ -3,7 +3,7 @@
// Imports
use crate::Data;
/// Error for [`DataNode::insert`]
/// Error for [`DataNode::insert`](super::DataNode::insert)
#[derive(Debug, thiserror::Error)]
pub enum InsertError {
/// The data location is not part of this node

View File

@@ -4,9 +4,9 @@
//! stores all function within the executable.
//!
//! Typically these functions will be a mix of the known function,
//! available through [`FuncTable::known`] and heuristically
//! available through [`FuncTable::get_known`] and heuristically
//! discovered functions through inst references, available
//! through [`FuncTable::search_insts`].
//! through [`FuncTable::search_instructions`].
// Modules
pub mod error;

View File

@@ -3,7 +3,7 @@
// Imports
use crate::{func, header};
/// Error type for [`Table::deserialize`]
/// Error type for [`ExeReader::deserialize`](super::ExeReader::deserialize)
#[derive(Debug, thiserror::Error)]
pub enum DeserializeError {
/// Unable to seek game file