pub struct RhaiAggregateFn { /* private fields */ }Expand description
Aggregate fn adapter — implements AggregatePluginFn by dispatching
to four Rhai callables.
Implementations§
Source§impl RhaiAggregateFn
impl RhaiAggregateFn
Sourcepub fn new(
runtime: Arc<RhaiPluginRuntime>,
name: impl Into<SmolStr>,
signature: AggSignature,
) -> Self
pub fn new( runtime: Arc<RhaiPluginRuntime>, name: impl Into<SmolStr>, signature: AggSignature, ) -> Self
Construct an aggregate adapter for name. The Rhai script must
export ${name}_init, ${name}_accumulate, ${name}_merge,
${name}_finalize.
Trait Implementations§
Source§impl AggregatePluginFn for RhaiAggregateFn
impl AggregatePluginFn for RhaiAggregateFn
Source§fn signature(&self) -> &AggSignature
fn signature(&self) -> &AggSignature
Static signature.
Source§fn create_accumulator(&self) -> Box<dyn PluginAccumulator>
fn create_accumulator(&self) -> Box<dyn PluginAccumulator>
Construct a fresh per-group accumulator.
Auto Trait Implementations§
impl !RefUnwindSafe for RhaiAggregateFn
impl !UnwindSafe for RhaiAggregateFn
impl Freeze for RhaiAggregateFn
impl Send for RhaiAggregateFn
impl Sync for RhaiAggregateFn
impl Unpin for RhaiAggregateFn
impl UnsafeUnpin for RhaiAggregateFn
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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