pub struct PortDelta { /* private fields */ }Expand description
One endpoint, as the two scans hold it.
The number and transport identify it in both. What moved is in
changes, and the whole record from each side is kept
alongside for context.
Implementations§
Source§impl PortDelta
impl PortDelta
Sourcepub fn presence(&self) -> Presence
pub fn presence(&self) -> Presence
Which scans hold a record for this endpoint, and what the other one says about having looked.
Sourcepub fn baseline(&self) -> Option<&Port>
pub fn baseline(&self) -> Option<&Port>
The baseline scan’s record, if it has one.
None also where the baseline’s record is PortState::Unasked: a
port nobody probed holds no finding. See diff.
Sourcepub fn current(&self) -> Option<&Port>
pub fn current(&self) -> Option<&Port>
The current scan’s record, if it has one, read the same way.
Sourcepub fn changes(&self) -> &[PortChange]
pub fn changes(&self) -> &[PortChange]
Everything that moved, in a fixed order: state, then service, then transport security.
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Whether anything is reported for this endpoint at all.
False only for an endpoint both scans hold identically, which the comparison does not emit.
Sourcepub fn is_opened(&self) -> bool
pub fn is_opened(&self) -> bool
Whether this endpoint accepts connections now and did not before.
Reads the records only. An endpoint the baseline has no record for counts,
as does one it recorded Unasked. Whether the
baseline looked at all is presence’s question:
Presence::is_confirmed separates a port that opened from one nobody had
checked.
Source§impl PortDelta
impl PortDelta
Sourcepub fn significance(&self) -> Significance
pub fn significance(&self) -> Significance
Trait Implementations§
impl StructuralPartialEq for PortDelta
Auto Trait Implementations§
impl Freeze for PortDelta
impl RefUnwindSafe for PortDelta
impl Send for PortDelta
impl Sync for PortDelta
impl Unpin for PortDelta
impl UnsafeUnpin for PortDelta
impl UnwindSafe for PortDelta
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more