pub struct SourceExtractionSession { /* private fields */ }Expand description
Reusable state for extracting multiple definition sources in one analysis run.
Reusing a session shares bounded parser and module-resolution work across files. Create one session per analysis root rather than sharing it between unrelated repositories.
Implementations§
Source§impl SourceExtractionSession
impl SourceExtractionSession
Sourcepub fn new(root: &Path) -> Self
pub fn new(root: &Path) -> Self
Creates an extraction session whose imported modules must remain inside root.
Sourcepub fn with_registrations(root: &Path, registrations: &[String]) -> Self
pub fn with_registrations(root: &Path, registrations: &[String]) -> Self
Creates a session that also treats registrations as step-registration function names.
Use this for project-declared wrappers that static inference cannot recognize, such as a helper that builds its registration call dynamically.
Sourcepub fn with_options(
root: &Path,
registrations: &[String],
assertion_modules: &[String],
) -> Self
pub fn with_options( root: &Path, registrations: &[String], assertion_modules: &[String], ) -> Self
Creates a session that also trusts assertion_modules as assertion-factory providers.
Use this for a local module that re-exports expect from a supported assertion package, or
for a runner this build does not recognize by name. Without it such a factory is untrusted
and its expected values are not treated as behaviour.
Trait Implementations§
Source§impl Default for SourceExtractionSession
impl Default for SourceExtractionSession
Source§fn default() -> SourceExtractionSession
fn default() -> SourceExtractionSession
Auto Trait Implementations§
impl Freeze for SourceExtractionSession
impl RefUnwindSafe for SourceExtractionSession
impl Send for SourceExtractionSession
impl Sync for SourceExtractionSession
impl Unpin for SourceExtractionSession
impl UnsafeUnpin for SourceExtractionSession
impl UnwindSafe for SourceExtractionSession
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
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