pub struct PromiseMapExecutor { /* private fields */ }
Expand description
PromiseMapExecutor handles .map() operations and promise pipelining
Implementations§
Source§impl PromiseMapExecutor
impl PromiseMapExecutor
pub fn new() -> Self
Sourcepub async fn register_map(
&self,
source_promise: PromiseId,
map_function: ILExpression,
result_promise: PromiseId,
) -> Result<(), RpcError>
pub async fn register_map( &self, source_promise: PromiseId, map_function: ILExpression, result_promise: PromiseId, ) -> Result<(), RpcError>
Register a .map() operation on a promise
Sourcepub async fn register_pipelined_call(
&self,
target_promise: PromiseId,
method: String,
args: Vec<Value>,
result_promise: PromiseId,
call_id: CallId,
) -> Result<(), RpcError>
pub async fn register_pipelined_call( &self, target_promise: PromiseId, method: String, args: Vec<Value>, result_promise: PromiseId, call_id: CallId, ) -> Result<(), RpcError>
Register a pipelined method call on a promise
Sourcepub async fn execute_map_on_resolution(
&self,
promise_id: PromiseId,
resolved_value: Value,
) -> Vec<(PromiseId, Result<Value, RpcError>)>
pub async fn execute_map_on_resolution( &self, promise_id: PromiseId, resolved_value: Value, ) -> Vec<(PromiseId, Result<Value, RpcError>)>
Execute map operations when a promise resolves
Sourcepub async fn execute_pipelined_calls(
&self,
promise_id: PromiseId,
capability: Arc<dyn RpcTarget>,
) -> Vec<(CallId, PromiseId, Result<Value, RpcError>)>
pub async fn execute_pipelined_calls( &self, promise_id: PromiseId, capability: Arc<dyn RpcTarget>, ) -> Vec<(CallId, PromiseId, Result<Value, RpcError>)>
Execute pipelined calls when a promise resolves to a capability
Sourcepub async fn get_dependent_promises(
&self,
promise_id: PromiseId,
) -> Vec<PromiseId>
pub async fn get_dependent_promises( &self, promise_id: PromiseId, ) -> Vec<PromiseId>
Get all promises that depend on a given promise
Sourcepub async fn would_create_cycle(
&self,
promise: PromiseId,
depends_on: PromiseId,
) -> bool
pub async fn would_create_cycle( &self, promise: PromiseId, depends_on: PromiseId, ) -> bool
Check if there would be a cycle when adding a dependency
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PromiseMapExecutor
impl !RefUnwindSafe for PromiseMapExecutor
impl Send for PromiseMapExecutor
impl Sync for PromiseMapExecutor
impl Unpin for PromiseMapExecutor
impl !UnwindSafe for PromiseMapExecutor
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