pub struct UnitReader { /* private fields */ }Expand description
Collects the functions of the files the finder shows it, one
UnitSource per detection source. SemanticPass reads files through
it; --compare uses it alone, with no clone detection.
Implementations§
Source§impl UnitReader
impl UnitReader
Sourcepub fn take_sources(&self) -> Vec<UnitSource>
pub fn take_sources(&self) -> Vec<UnitSource>
The functions read since the last call, in source-id order, so that the result does not depend on which worker read which file.
Trait Implementations§
Source§impl ClonePass for UnitReader
impl ClonePass for UnitReader
Source§fn name(&self) -> &'static str
fn name(&self) -> &'static str
Named after --compare, the one mode that runs it on its own;
inside SemanticPass the pass’s own name is used.
Source§fn find(&self, _: &PassContext<'_>) -> Result<Vec<CpdClone>, String>
fn find(&self, _: &PassContext<'_>) -> Result<Vec<CpdClone>, String>
Finds nothing: the reader only collects.
Auto Trait Implementations§
impl !Freeze for UnitReader
impl RefUnwindSafe for UnitReader
impl Send for UnitReader
impl Sync for UnitReader
impl Unpin for UnitReader
impl UnsafeUnpin for UnitReader
impl UnwindSafe for UnitReader
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
Converts
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> ⓘ
Converts
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