[][src]Struct egg::BackoffScheduler

pub struct BackoffScheduler { /* fields omitted */ }

A RewriteScheduler that implements exponentional rule backoff.

For each rewrite, there exists a configurable initial match limit. If a rewrite search yield more than this limit, then we ban this rule for number of iterations, double its limit, and double the time it will be banned next time.

This seems effective at preventing explosive rules like associativity from taking an unfair amount of resources.

BackoffScheduler is configurable in the builder-pattern style.

Implementations

impl BackoffScheduler[src]

pub fn with_initial_match_limit(self, initial_match_limit: usize) -> Self[src]

Set the initial match limit after which a rule will be banned. Default: 1,000

pub fn with_ban_length(self, ban_length: usize) -> Self[src]

Set the initial ban length. Default: 5 iterations

pub fn do_not_ban(self, name: impl Into<String>) -> Self[src]

Never ban a particular rule.

Trait Implementations

impl Default for BackoffScheduler[src]

impl<L, N> RewriteScheduler<L, N> for BackoffScheduler where
    L: Language,
    N: Analysis<L>, 
[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.