pub struct EvidenceSession { /* private fields */ }Expand description
Immutable project snapshot bound to the exact host services that produced and can resolve its evidence.
Adapters build a session once per source snapshot. Runtime evaluation then consumes the project and services as one unit, preventing accidental use of a resolver from a different model revision.
Implementations§
Source§impl EvidenceSession
impl EvidenceSession
Sourcepub fn try_new(
project: Project,
snapshots: impl IntoIterator<Item = SourceSnapshot>,
) -> Result<Self, EvidenceSessionError>
pub fn try_new( project: Project, snapshots: impl IntoIterator<Item = SourceSnapshot>, ) -> Result<Self, EvidenceSessionError>
Starts a session after proving every project source has exactly one snapshot.
Sourcepub fn with_service<T: SnapshotBoundService>(
self,
service: T,
) -> Result<Self, EvidenceSessionError>
pub fn with_service<T: SnapshotBoundService>( self, service: T, ) -> Result<Self, EvidenceSessionError>
Registers one non-replaceable typed evidence service.
Sourcepub fn snapshots(&self) -> impl ExactSizeIterator<Item = &SourceSnapshot>
pub fn snapshots(&self) -> impl ExactSizeIterator<Item = &SourceSnapshot>
Returns all immutable source identities bound to the project.
Sourcepub fn snapshot(&self, source: &SourceId) -> Option<&SourceSnapshot>
pub fn snapshot(&self, source: &SourceId) -> Option<&SourceSnapshot>
Returns one source snapshot identity.
Sourcepub fn services(&self) -> &ServiceRegistry
pub fn services(&self) -> &ServiceRegistry
Returns all services bound to this snapshot.
Auto Trait Implementations§
impl Freeze for EvidenceSession
impl !RefUnwindSafe for EvidenceSession
impl Send for EvidenceSession
impl Sync for EvidenceSession
impl Unpin for EvidenceSession
impl !UnwindSafe for EvidenceSession
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