pub struct PortCache { /* private fields */ }Implementations§
Source§impl PortCache
impl PortCache
pub fn new() -> Arc<Self>
Sourcepub fn global() -> Arc<Self>
pub fn global() -> Arc<Self>
Process-wide cache so back-to-back checks in ruso scan reuse state.
Sourcepub fn endpoints_for_run(
spec: &ProgramSpec,
base_url: &str,
) -> Vec<(String, u16)>
pub fn endpoints_for_run( spec: &ProgramSpec, base_url: &str, ) -> Vec<(String, u16)>
Endpoints to probe before running: socket probes in the spec plus --target host:port for HTTP checks.
Sourcepub async fn check_for_run(
&self,
spec: &ProgramSpec,
base_url: &str,
) -> (Vec<PortCheck>, Option<(String, u16)>)
pub async fn check_for_run( &self, spec: &ProgramSpec, base_url: &str, ) -> (Vec<PortCheck>, Option<(String, u16)>)
Probe every endpoint for this run; returns checks and the first closed (host, port) if any.
pub async fn is_open(&self, host: &str, port: u16) -> bool
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for PortCache
impl !RefUnwindSafe for PortCache
impl Send for PortCache
impl Sync for PortCache
impl Unpin for PortCache
impl UnsafeUnpin for PortCache
impl UnwindSafe for PortCache
Blanket Implementations§
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
Mutably borrows from an owned value. Read more