Skip to main content

ReportBuilder

Struct ReportBuilder 

Source
pub struct ReportBuilder<'a, Fallback = (), State: ReportBuilderState = WithoutSpec> { /* private fields */ }

Implementations§

Source§

impl<'a, Fallback: SelectableSource, X: ReportBuilderState> ReportBuilder<'a, Fallback, X>

Source

pub const fn with_max_list_length(self, max: Option<u32>) -> Self

Source

pub const fn with_max_string_length(self, max: Option<usize>) -> Self

Source

pub const fn with_max_executed_stmts(self, max: Option<usize>) -> Self

Source

pub const fn with_max_statement_stack_height(self, max: Option<usize>) -> Self

Source

pub const fn with_eval_limits(self, limits: EvalLimitations) -> Self

Source

pub fn with_allowed_network( self, net: Option<Arc<dyn Fn(AllowNetData) -> Result<AllowNetData, (AllowNetData, cerr)> + Send + Sync>>, ) -> Self

Source

pub fn with_log_pfx(self, log_pfx: Option<LogPfx>) -> Self

Source

pub fn with_fallback(self, fb: Option<Fallback>) -> Self

Source

pub fn add_allow_network_map_check( self, closure: impl Fn(AllowNetData) -> Result<AllowNetData, (AllowNetData, cerr)> + Send + Sync + 'static, ) -> Self

Source

pub fn add_allow_network_if_check( self, closure: impl Fn(&AllowNetData) -> bool + Send + Sync + 'static, ) -> Self

Source

pub fn add_allow_network_cerr_check( self, closure: impl Fn(&AllowNetData) -> Result<(), cerr> + Send + Sync + 'static, ) -> Self

Source

pub fn disallow_network(self) -> Self

removes all checks and disallows all network access in this way

Source§

impl ReportBuilder<'static, (), WithoutSpec>

Source

pub const fn no_limits() -> Self

Source

pub const fn new_good_limits() -> Self

Source§

impl<Fallback: SelectableSource> ReportBuilder<'static, Fallback, WithoutSpec>

Source

pub fn with_spec<'a>( self, spec: &'a Bast3StSpec, ) -> ReportBuilder<'a, Fallback, WithSpec>

Source§

impl<'a, Fallback: SelectableSource> ReportBuilder<'a, Fallback, WithSpec>

Source

pub fn build( self, doc: ProjectDoc, initial_block: Id, ) -> (Context, (LogPfx, Option<RealMapping>, Option<Fallback>, &'a Bast3StSpec))

Source

pub async fn run( self, doc: ProjectDoc, initial_block: Option<Id>, ) -> Result<PSpec, SpecRunError>
where Fallback: Clone + 'static,

Source

pub async fn run_from_unique_flag( self, doc: ProjectDoc, ) -> Result<PSpec, SpecRunError>
where Fallback: Clone + 'static,

Trait Implementations§

Source§

impl<'a, Fallback: Clone, State: Clone + ReportBuilderState> Clone for ReportBuilder<'a, Fallback, State>
where State::Spec<'a>: Clone,

Source§

fn clone(&self) -> ReportBuilder<'a, Fallback, State>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a, Fallback, State: ReportBuilderState> Debug for ReportBuilder<'a, Fallback, State>
where Option<Fallback>: Debug, State::Spec<'a>: Debug, PhantomData<State>: Debug,

Source§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ReportBuilder<'static, (), WithoutSpec>

Source§

fn default() -> Self

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

Auto Trait Implementations§

§

impl<'a, Fallback = (), State = WithoutSpec> !RefUnwindSafe for ReportBuilder<'a, Fallback, State>

§

impl<'a, Fallback = (), State = WithoutSpec> !UnwindSafe for ReportBuilder<'a, Fallback, State>

§

impl<'a, Fallback, State> Freeze for ReportBuilder<'a, Fallback, State>
where <State as ReportBuilderState>::Spec<'a>: Freeze, Fallback: Freeze,

§

impl<'a, Fallback, State> Send for ReportBuilder<'a, Fallback, State>
where <State as ReportBuilderState>::Spec<'a>: Send, Fallback: Send, State: Send,

§

impl<'a, Fallback, State> Sync for ReportBuilder<'a, Fallback, State>
where <State as ReportBuilderState>::Spec<'a>: Sync, Fallback: Sync, State: Sync,

§

impl<'a, Fallback, State> Unpin for ReportBuilder<'a, Fallback, State>
where <State as ReportBuilderState>::Spec<'a>: Unpin, Fallback: Unpin, State: Unpin,

§

impl<'a, Fallback, State> UnsafeUnpin for ReportBuilder<'a, Fallback, State>
where <State as ReportBuilderState>::Spec<'a>: UnsafeUnpin, Fallback: UnsafeUnpin,

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more