Skip to content

Commit

Permalink
Clarified the meaning of the hit and miss enum cases, for Result.
Browse files Browse the repository at this point in the history
  • Loading branch information
wadetregaskis committed Feb 13, 2024
1 parent 7eb061b commit 9b794a0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Sources/NetworkScanner/NetworkScanner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,12 @@ public struct NetworkScanner<HitData: Sendable, MissData: Sendable>: AsyncSequen
///
/// Note that if the probe closure throws an exception, that is not represented by this enum - it is instead propagated back to the iterator of the ``NetworkScanner`` (as a real, thrown exception).
public enum Conclusion: Sendable {
/// The probe succeeded (returned `true`).
/// The probe succeeded.
case hit(HitData)

/// The probe returned `false`.
/// The probe _completed_ successfully but the target address did not meet is criteria.
///
/// This is distinct from the probe actually _failing_, which is communicate by the probe throwing an exception (which causes scanning to abort entirely).
case miss(MissData)
}

Expand Down

0 comments on commit 9b794a0

Please sign in to comment.