Rush

Struct Rush 

Source
pub struct Rush { /* private fields */ }

Implementations§

Source§

impl Rush

Source

pub fn new() -> Self

Source

pub fn register_rule<C: CalcNode + Send + Sync + 'static, E: Exec + Send + Sync + 'static, T: Into<String>>( self, name: T, nodes: Vec<C>, exec: E, ) -> Self

Source

pub fn delete_rule<T: AsRef<str>>(&mut self, name: T)

Source

pub fn raw_register_function<S: Into<String>, F: Function>( self, name: S, function: F, ) -> Self

Source

pub fn register_function<S: Into<String>, Args, Out, F>( self, name: S, function: F, ) -> Self
where F: HostFunction<Args, Out> + 'static, Out: Serialize,

Source

pub fn delete_function<S: AsRef<str>>(self, name: S) -> Self

Source

pub fn execute(&self, obj: &Value, list: Vec<String>) -> Result<Value>

Source§

impl Rush

Source

pub fn set_env<E: Into<Env>>(self, env: E) -> Self

Trait Implementations§

Source§

impl AsyncRuleFlow for Rush

Source§

fn async_flow<'life0, 'async_trait, Obj, Out>( &'life0 self, obj: Obj, ) -> Pin<Box<dyn Future<Output = Result<Out>> + Send + 'async_trait>>
where Obj: 'async_trait + Serialize + Send, Out: 'async_trait + for<'a> Deserialize<'a>, Self: 'async_trait, 'life0: 'async_trait,

Source§

impl Debug for Rush

Source§

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

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

impl Display for Rush

Source§

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

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

impl<C, E, I: IntoIterator<Item = (String, Vec<C>, E)>> From<I> for Rush
where C: CalcNode + 'static, E: Exec + 'static,

Source§

fn from(value: I) -> Self

Converts to this type from the input type.
Source§

impl From<Rush> for MultiRush

Source§

fn from(value: Rush) -> Self

Converts to this type from the input type.
Source§

impl RuleFlow for Rush

Source§

fn flow<Obj: Serialize, Out: Deserialize<'static>>( &self, obj: Obj, ) -> Result<Out>

Source§

fn version(&self) -> i32

Auto Trait Implementations§

§

impl Freeze for Rush

§

impl !RefUnwindSafe for Rush

§

impl Send for Rush

§

impl Sync for Rush

§

impl Unpin for Rush

§

impl !UnwindSafe for Rush

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> PFArc<T> for T

Source§

fn arc(self) -> Arc<T>

Source§

impl<T> PFBox<T> for T

Source§

fn to_box(self) -> Box<T>

Source§

impl<Ok, T> PFErr<Ok> for T

Source§

fn err(self) -> Result<Ok, Self>
where Self: Sized,

Source§

impl<Err, T> PFOk<Err> for T

Source§

fn ok(self) -> Result<Self, Err>
where Self: Sized,

Source§

impl<T> PFSome<T> for T

Source§

fn some(self) -> Option<T>

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.