pub struct SyncInvocation<R> { /* private fields */ }Expand description
Synchronous invocation result — created when dev_mode_force_sync = true.
Mirrors pynenc’s ConcurrentInvocation. The task has already been executed
(with retries if configured); this wrapper provides the same interface as
InvocationHandle for unified API usage via Invocation.
No backend interaction — status and result are held in memory.
Implementations§
Source§impl<R> SyncInvocation<R>
impl<R> SyncInvocation<R>
Sourcepub fn success(invocation_id: InvocationId, result: R) -> Self
pub fn success(invocation_id: InvocationId, result: R) -> Self
Create a successful sync invocation.
Sourcepub fn failed(invocation_id: InvocationId, error: RustvelloError) -> Self
pub fn failed(invocation_id: InvocationId, error: RustvelloError) -> Self
Create a failed sync invocation.
Sourcepub fn invocation_id(&self) -> &InvocationId
pub fn invocation_id(&self) -> &InvocationId
Get the invocation’s unique identifier.
Sourcepub fn status(&self) -> InvocationStatus
pub fn status(&self) -> InvocationStatus
Get the status (always terminal for sync invocations).
Trait Implementations§
Auto Trait Implementations§
impl<R> Freeze for SyncInvocation<R>where
R: Freeze,
impl<R> !RefUnwindSafe for SyncInvocation<R>
impl<R> Send for SyncInvocation<R>where
R: Send,
impl<R> Sync for SyncInvocation<R>where
R: Sync,
impl<R> Unpin for SyncInvocation<R>where
R: Unpin,
impl<R> UnsafeUnpin for SyncInvocation<R>where
R: UnsafeUnpin,
impl<R> !UnwindSafe for SyncInvocation<R>
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