Skip to main content

SourceExtractionSession

Struct SourceExtractionSession 

Source
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

Source

pub fn with_dependencies(self, dependencies: &[SourceDependency]) -> Self

Supplies resolved loading edges from discovery without executing dependencies.

Source

pub fn finalize( &mut self, files: &[SourceFile], definitions: &mut Vec<StepDefinition>, ) -> Result<SourceFinalization>

Finalizes all selected frontends after extraction and applies cross-file trust effects.

Call this before analyzing accumulated definitions. A later source can invalidate an earlier registration; individual extraction results are provisional until this operation.

Source

pub fn with_dependency_gaps(self, gaps: &[DependencyGap]) -> Self

Supplies loading calls that discovery refused to follow, so their diagnostics name the cause.

Source

pub fn new(root: &Path) -> Self

Creates an extraction session whose imported modules must remain inside root.

Source

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.

Source

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

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.