File tree Expand file tree Collapse file tree 4 files changed +11
-12
lines changed Expand file tree Collapse file tree 4 files changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ fn load_store() -> Store {
89
89
///
90
90
/// # Errors
91
91
///
92
- /// Returns [DaemonError ] if store operations fail.
92
+ /// Returns [RunError ] if store operations fail.
93
93
fn wakeup ( store : & mut Store ) -> Result < ( ) , RunError > {
94
94
info ! ( "waking up!" ) ;
95
95
@@ -120,7 +120,7 @@ fn signal_hook() {
120
120
///
121
121
/// # Errors
122
122
///
123
- /// Returns [DaemonError ] if cleanup operations fail.
123
+ /// Returns [RunError ] if cleanup operations fail.
124
124
fn cleanup ( store : & Store ) -> Result < ( ) , RunError > {
125
125
if let Err ( err) = store. save ( ) {
126
126
error ! ( "error while saving to file: {err:#?}" ) ;
Original file line number Diff line number Diff line change @@ -274,7 +274,7 @@ pub fn getpid() -> Option<i32> {
274
274
275
275
/// Formats a [SystemTime](std::time::SystemTime) as an easily readable timestamp for humans.
276
276
///
277
- /// Works with [std::time::SystemTime] and [chrono::DateTime<Local>].
277
+ /// Works with [` std::time::SystemTime` ] and [` chrono::DateTime<Local>` ].
278
278
///
279
279
/// # Examples
280
280
///
Original file line number Diff line number Diff line change 3
3
//! This module provides specialized error types for different components of netpulse:
4
4
//! - [`StoreError`] - Errors related to store operations (loading, saving, versioning)
5
5
//! - [`CheckError`] - Errors that occur during network checks (HTTP, ICMP)
6
- //! - [`DaemonError `] - Errors specific to daemon operations
6
+ //! - [`RunError `] - Errors specific to executable operations
7
7
//! - [`AnalysisError`] - Errors that occur during analysis and report generation
8
8
//!
9
9
//! All error types implement the standard Error trait and provide detailed error information.
@@ -86,12 +86,6 @@ pub enum StoreError {
86
86
///
87
87
/// This variant contains a [FlagSet] with only the flags [CheckFlags](CheckFlag) set that
88
88
/// 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.
95
89
#[ error( "Check is missing at least one of these flags: {0:?}" ) ]
96
90
MissingFlag ( FlagSet < CheckFlag > ) ,
97
91
/// Occurs when trying to convert an arbitrary [u8] to a [Version](crate::store::Version) that
Original file line number Diff line number Diff line change @@ -365,7 +365,7 @@ impl Check {
365
365
366
366
/// Determines whether the check used IPv4 or IPv6.
367
367
///
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.
369
369
///
370
370
/// # Returns
371
371
///
@@ -383,6 +383,11 @@ impl Check {
383
383
}
384
384
Ok ( ( ) )
385
385
}
386
+
387
+ /// Returns the target of this [`Check`].
388
+ pub fn target ( & self ) -> IpAddr {
389
+ self . target
390
+ }
386
391
}
387
392
388
393
impl Display for Check {
@@ -426,7 +431,7 @@ impl From<IpAddr> for IpType {
426
431
///
427
432
/// # Errors
428
433
///
429
- /// Returns [AnalysisError ] if string formatting fails.
434
+ /// Returns [`std::fmt::Error` ] if string formatting fails.
430
435
pub fn display_group ( group : & [ & Check ] , f : & mut String ) -> Result < ( ) , std:: fmt:: Error > {
431
436
if group. is_empty ( ) {
432
437
writeln ! ( f, "\t <Empty>" ) ?;
You can’t perform that action at this time.
0 commit comments