Skip to main content

Runtime

Struct Runtime 

Source
pub struct Runtime { /* private fields */ }
Expand description

Deterministic runtime that invokes only registered trusted capabilities.

Implementations§

Source§

impl Runtime

Source

pub fn new(registry: CapabilityRegistry) -> Self

Creates a runtime from a host-controlled registry.

Source

pub fn with_rule_summaries(self) -> Self

Reports per-rule counts and status (Report::rules): how many objects each rule surely selected, how many it found or left not evaluated, and whether it passed, failed, was not evaluated or selected nothing. Off by default, and then reports are unchanged. Needs the registry’s outcome refiner to count selections.

Source

pub fn with_locations(self, policy: LocationPolicy) -> Self

Locates every finding and not-evaluated outcome by storey and space as policy says. Off by default, and then reports carry no location. Needs the registry’s outcome refiner.

Source

pub fn with_services(self, services: ServiceRegistry) -> Self

Adds adapter-provided host services to subsequent evaluations.

Source

pub fn run( &self, project: &Project, plan: ExecutionPlan, ) -> Result<Report, EngineError>

Executes a plan and returns deterministically sorted findings.

Execution fails closed if the host registry no longer contains any capability that was present when the plan was compiled.

A bare project carries no source type-system declarations, so package concepts bind to nothing and concept-based selection is reported as not evaluated. Hosts that want concept binding run an EvidenceSession.

Source

pub fn run_session( &self, session: &EvidenceSession, plan: ExecutionPlan, ) -> Result<Report, EngineError>

Executes a plan against one immutable source/evidence snapshot.

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, 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.