pub struct AgentRunnerBuilder<T>where
T: MoFAAgent,{ /* private fields */ }Expand description
AgentRunner 构建器
Implementations§
Source§impl<T> AgentRunnerBuilder<T>where
T: MoFAAgent,
impl<T> AgentRunnerBuilder<T>where
T: MoFAAgent,
Sourcepub fn new() -> AgentRunnerBuilder<T>
pub fn new() -> AgentRunnerBuilder<T>
创建新的构建器
Sourcepub fn with_agent(self, agent: T) -> AgentRunnerBuilder<T>
pub fn with_agent(self, agent: T) -> AgentRunnerBuilder<T>
设置 Agent
Sourcepub fn with_context(self, context: AgentContext) -> AgentRunnerBuilder<T>
pub fn with_context(self, context: AgentContext) -> AgentRunnerBuilder<T>
设置上下文
Sourcepub async fn build(self) -> Result<AgentRunner<T>, AgentError>
pub async fn build(self) -> Result<AgentRunner<T>, AgentError>
构建运行器
Trait Implementations§
Source§impl<T> Default for AgentRunnerBuilder<T>where
T: MoFAAgent,
impl<T> Default for AgentRunnerBuilder<T>where
T: MoFAAgent,
Source§fn default() -> AgentRunnerBuilder<T>
fn default() -> AgentRunnerBuilder<T>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<T> Freeze for AgentRunnerBuilder<T>where
T: Freeze,
impl<T> !RefUnwindSafe for AgentRunnerBuilder<T>
impl<T> Send for AgentRunnerBuilder<T>
impl<T> Sync for AgentRunnerBuilder<T>
impl<T> Unpin for AgentRunnerBuilder<T>where
T: Unpin,
impl<T> UnsafeUnpin for AgentRunnerBuilder<T>where
T: UnsafeUnpin,
impl<T> !UnwindSafe for AgentRunnerBuilder<T>
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> 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 moreSource§impl<T> Message for T
impl<T> Message for T
Source§fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
Convert a BoxedMessage to this concrete type
Source§fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
Convert this message to a BoxedMessage