pub trait EvalCachedAsync:
Debug
+ Default
+ Send
+ Sync
+ 'static {
type Args: Debug + Any + Send + Sync;
const NAME: &str;
const NEEDS_CALLSITE: bool;
// Required methods
fn prepare_args(&mut self, cached: &CachedVals) -> Option<Self::Args>;
fn eval(args: Self::Args) -> impl Future<Output = Value> + Send;
// Provided methods
fn init<R: Rt, E: UserEvent>(
_ctx: &mut ExecCtx<R, E>,
_typ: &FnType,
_resolved: Option<&FnType>,
_scope: &Scope,
_from: &[Node<R, E>],
_top_id: ExprId,
) -> Self { ... }
fn map_value<R: Rt, E: UserEvent>(
&mut self,
_ctx: &mut ExecCtx<R, E>,
v: Value,
) -> Option<Value> { ... }
fn typecheck<R: Rt, E: UserEvent>(
&mut self,
_ctx: &mut ExecCtx<R, E>,
_from: &mut [Node<R, E>],
_phase: TypecheckPhase<'_>,
) -> Result<()> { ... }
}Required Associated Constants§
Required Associated Types§
Required Methods§
fn prepare_args(&mut self, cached: &CachedVals) -> Option<Self::Args>
fn eval(args: Self::Args) -> impl Future<Output = Value> + Send
Provided Methods§
fn init<R: Rt, E: UserEvent>( _ctx: &mut ExecCtx<R, E>, _typ: &FnType, _resolved: Option<&FnType>, _scope: &Scope, _from: &[Node<R, E>], _top_id: ExprId, ) -> Self
Sourcefn map_value<R: Rt, E: UserEvent>(
&mut self,
_ctx: &mut ExecCtx<R, E>,
v: Value,
) -> Option<Value>
fn map_value<R: Rt, E: UserEvent>( &mut self, _ctx: &mut ExecCtx<R, E>, v: Value, ) -> Option<Value>
map the final value with access to self and ctx
fn typecheck<R: Rt, E: UserEvent>( &mut self, _ctx: &mut ExecCtx<R, E>, _from: &mut [Node<R, E>], _phase: TypecheckPhase<'_>, ) -> Result<()>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.