pub enum RuntimeExecutionBackend {
Inline(InlineBackend),
Thread(ThreadBackend),
Distributed(DistributedBackend),
}Variants§
Implementations§
Source§impl RuntimeExecutionBackend
impl RuntimeExecutionBackend
pub fn execute<F>(
&self,
task: &AgentTask,
initial_messages: Vec<Message>,
shared_state: Metadata,
cycle_executor: F,
cancellation_token: Option<&CancellationToken>,
max_cycles: u32,
) -> AgentResultwhere
F: FnMut(u32, &mut Vec<Message>, &mut Vec<CycleRecord>, &mut Metadata, Option<&CancellationToken>) -> Option<AgentResult>,
pub fn parallel_map<T, R, F>(&self, function: F, items: Vec<T>) -> Vec<R>
Trait Implementations§
Source§impl Clone for RuntimeExecutionBackend
impl Clone for RuntimeExecutionBackend
Source§fn clone(&self) -> RuntimeExecutionBackend
fn clone(&self) -> RuntimeExecutionBackend
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RuntimeExecutionBackend
impl Debug for RuntimeExecutionBackend
Source§impl Default for RuntimeExecutionBackend
impl Default for RuntimeExecutionBackend
Source§impl From<DistributedBackend> for RuntimeExecutionBackend
impl From<DistributedBackend> for RuntimeExecutionBackend
Source§fn from(backend: DistributedBackend) -> Self
fn from(backend: DistributedBackend) -> Self
Converts to this type from the input type.
Source§impl From<ExecutionMode> for RuntimeExecutionBackend
impl From<ExecutionMode> for RuntimeExecutionBackend
Source§fn from(mode: ExecutionMode) -> Self
fn from(mode: ExecutionMode) -> Self
Converts to this type from the input type.
Source§impl From<InlineBackend> for RuntimeExecutionBackend
impl From<InlineBackend> for RuntimeExecutionBackend
Source§fn from(backend: InlineBackend) -> Self
fn from(backend: InlineBackend) -> Self
Converts to this type from the input type.
Source§impl From<ThreadBackend> for RuntimeExecutionBackend
impl From<ThreadBackend> for RuntimeExecutionBackend
Source§fn from(backend: ThreadBackend) -> Self
fn from(backend: ThreadBackend) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RuntimeExecutionBackend
impl !RefUnwindSafe for RuntimeExecutionBackend
impl Send for RuntimeExecutionBackend
impl Sync for RuntimeExecutionBackend
impl Unpin for RuntimeExecutionBackend
impl UnsafeUnpin for RuntimeExecutionBackend
impl !UnwindSafe for RuntimeExecutionBackend
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreCreates a shared type from an unshared type.