Skip to content

Commit e238a1f

Browse files
committed
docs(api): fix doc links and old info
1 parent 25258c3 commit e238a1f

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

src/bins/daemon.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ fn load_store() -> Store {
8989
///
9090
/// # Errors
9191
///
92-
/// Returns [DaemonError] if store operations fail.
92+
/// Returns [RunError] if store operations fail.
9393
fn wakeup(store: &mut Store) -> Result<(), RunError> {
9494
info!("waking up!");
9595

@@ -120,7 +120,7 @@ fn signal_hook() {
120120
///
121121
/// # Errors
122122
///
123-
/// Returns [DaemonError] if cleanup operations fail.
123+
/// Returns [RunError] if cleanup operations fail.
124124
fn cleanup(store: &Store) -> Result<(), RunError> {
125125
if let Err(err) = store.save() {
126126
error!("error while saving to file: {err:#?}");

src/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ pub fn getpid() -> Option<i32> {
274274

275275
/// Formats a [SystemTime](std::time::SystemTime) as an easily readable timestamp for humans.
276276
///
277-
/// Works with [std::time::SystemTime] and [chrono::DateTime<Local>].
277+
/// Works with [`std::time::SystemTime`] and [`chrono::DateTime<Local>`].
278278
///
279279
/// # Examples
280280
///

src/errors.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//! This module provides specialized error types for different components of netpulse:
44
//! - [`StoreError`] - Errors related to store operations (loading, saving, versioning)
55
//! - [`CheckError`] - Errors that occur during network checks (HTTP, ICMP)
6-
//! - [`DaemonError`] - Errors specific to daemon operations
6+
//! - [`RunError`] - Errors specific to executable operations
77
//! - [`AnalysisError`] - Errors that occur during analysis and report generation
88
//!
99
//! All error types implement the standard Error trait and provide detailed error information.
@@ -86,12 +86,6 @@ pub enum StoreError {
8686
///
8787
/// This variant contains a [FlagSet] with only the flags [CheckFlags](CheckFlag) set that
8888
/// would make it a valid state. Exactly one of these flags must be set.
89-
///
90-
/// # Example
91-
///
92-
/// Every check should have either [CheckFlag::IPv4] or [CheckFlag::IPv6] set. If none of these
93-
/// are set, this error will be returned with a [FlagSet] that has both flags set, to indicate
94-
/// that one of these should be set.
9589
#[error("Check is missing at least one of these flags: {0:?}")]
9690
MissingFlag(FlagSet<CheckFlag>),
9791
/// Occurs when trying to convert an arbitrary [u8] to a [Version](crate::store::Version) that

src/records.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ impl Check {
365365

366366
/// Determines whether the check used IPv4 or IPv6.
367367
///
368-
/// Examines the [check's](Check) [target](Check::target) to determine which IP version was used.
368+
/// Examines the [check's](Check) [target](Check::target()) to determine which IP version was used.
369369
///
370370
/// # Returns
371371
///
@@ -383,6 +383,11 @@ impl Check {
383383
}
384384
Ok(())
385385
}
386+
387+
/// Returns the target of this [`Check`].
388+
pub fn target(&self) -> IpAddr {
389+
self.target
390+
}
386391
}
387392

388393
impl Display for Check {
@@ -426,7 +431,7 @@ impl From<IpAddr> for IpType {
426431
///
427432
/// # Errors
428433
///
429-
/// Returns [AnalysisError] if string formatting fails.
434+
/// Returns [`std::fmt::Error`] if string formatting fails.
430435
pub fn display_group(group: &[&Check], f: &mut String) -> Result<(), std::fmt::Error> {
431436
if group.is_empty() {
432437
writeln!(f, "\t<Empty>")?;

0 commit comments

Comments
 (0)