pub struct SemanticPass { /* private fields */ }Expand description
Finds semantic clones among the functions of the files the finder shows it: reads each file’s functions while the finder holds it, then embeds and pairs them once the token passes are done.
Implementations§
Source§impl SemanticPass
impl SemanticPass
Sourcepub fn new(
embedder: Arc<dyn Embedder>,
thresholds: Thresholds,
scope: SemanticScope,
) -> Self
pub fn new( embedder: Arc<dyn Embedder>, thresholds: Thresholds, scope: SemanticScope, ) -> Self
thresholds: the similarities the rules need, on the scale of the
embedder’s model (see SemanticOptions::thresholds); scope: pairs
within one language, across languages, or both.
Trait Implementations§
Source§impl ClonePass for SemanticPass
impl ClonePass for SemanticPass
Source§fn reads(&self, format: &str) -> bool
fn reads(&self, format: &str) -> bool
Whether the pass reads files of
format; others are not shown to it.Auto Trait Implementations§
impl !Freeze for SemanticPass
impl !RefUnwindSafe for SemanticPass
impl !UnwindSafe for SemanticPass
impl Send for SemanticPass
impl Sync for SemanticPass
impl Unpin for SemanticPass
impl UnsafeUnpin for SemanticPass
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