pub struct DistributedBackend { /* private fields */ }Implementations§
Source§impl DistributedBackend
impl DistributedBackend
pub fn inline_fallback() -> Self
pub fn distributed(runtime_recipe: RuntimeRecipe) -> Self
pub fn distributed_with_dispatcher( runtime_recipe: RuntimeRecipe, state_store: Arc<dyn StateStore>, cycle_dispatcher: Arc<dyn CycleDispatcher>, ) -> Self
pub fn with_cycle_name(self, cycle_name: impl Into<String>) -> Self
pub fn runtime_recipe(&self) -> Option<&RuntimeRecipe>
pub fn state_store(&self) -> Option<&Arc<dyn StateStore>>
pub fn cycle_name(&self) -> &str
pub fn parallel_map<T, R, F>(&self, function: F, items: Vec<T>) -> Vec<R>where
F: Fn(T) -> R,
Source§impl DistributedBackend
impl DistributedBackend
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>,
Trait Implementations§
Source§impl Clone for DistributedBackend
impl Clone for DistributedBackend
Source§fn clone(&self) -> DistributedBackend
fn clone(&self) -> DistributedBackend
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 DistributedBackend
impl Debug for DistributedBackend
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.
Auto Trait Implementations§
impl Freeze for DistributedBackend
impl !RefUnwindSafe for DistributedBackend
impl Send for DistributedBackend
impl Sync for DistributedBackend
impl Unpin for DistributedBackend
impl UnsafeUnpin for DistributedBackend
impl !UnwindSafe for DistributedBackend
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.