pub struct ScanTarget {
pub path: PathBuf,
pub kind: TargetKind,
pub source: DiscoverySource,
}Expand description
A scan target representing a file or directory to be scanned.
Fields§
§path: PathBufThe path to the target.
kind: TargetKindThe kind of target.
source: DiscoverySourceThe discovery source (how this target was found).
Implementations§
Source§impl ScanTarget
impl ScanTarget
Sourcepub fn new(path: PathBuf, kind: TargetKind, source: DiscoverySource) -> Self
pub fn new(path: PathBuf, kind: TargetKind, source: DiscoverySource) -> Self
Create a new scan target.
Sourcepub fn from_path(path: PathBuf, source: DiscoverySource) -> Self
pub fn from_path(path: PathBuf, source: DiscoverySource) -> Self
Create a scan target from a path, auto-detecting the kind.
Sourcepub fn user_specified(path: PathBuf) -> Self
pub fn user_specified(path: PathBuf) -> Self
Create a user-specified scan target.
Sourcepub fn discovered(path: PathBuf) -> Self
pub fn discovered(path: PathBuf) -> Self
Create a file system discovered scan target.
Sourcepub fn from_client(path: PathBuf) -> Self
pub fn from_client(path: PathBuf) -> Self
Create a client-detected scan target.
Trait Implementations§
Source§impl Clone for ScanTarget
impl Clone for ScanTarget
Source§fn clone(&self) -> ScanTarget
fn clone(&self) -> ScanTarget
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ScanTarget
impl RefUnwindSafe for ScanTarget
impl Send for ScanTarget
impl Sync for ScanTarget
impl Unpin for ScanTarget
impl UnwindSafe for ScanTarget
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