pub struct LearnableSwarm { /* private fields */ }Expand description
学習機能付き Swarm
Orchestrator + LearningDaemon + Subscriber を統合管理する。
Implementations§
Source§impl LearnableSwarm
impl LearnableSwarm
Sourcepub fn run_task(&mut self, task: SwarmTask) -> Result<SwarmResult, SwarmError>
pub fn run_task(&mut self, task: SwarmTask) -> Result<SwarmResult, SwarmError>
タスクを実行
Sourcepub fn run(&mut self) -> SwarmResult
pub fn run(&mut self) -> SwarmResult
メインループを実行(タスクなし)
Sourcepub fn orchestrator(&self) -> &Orchestrator
pub fn orchestrator(&self) -> &Orchestrator
Orchestrator への参照を取得
Sourcepub fn orchestrator_mut(&mut self) -> &mut Orchestrator
pub fn orchestrator_mut(&mut self) -> &mut Orchestrator
Orchestrator への可変参照を取得
Sourcepub fn dependency_graph(&self) -> Option<&DependencyGraph>
pub fn dependency_graph(&self) -> Option<&DependencyGraph>
DependencyGraph への参照を取得
Sourcepub fn config(&self) -> &LearnableSwarmConfig
pub fn config(&self) -> &LearnableSwarmConfig
設定を取得
Sourcepub fn learning_store(&self) -> Option<&LearningStore>
pub fn learning_store(&self) -> Option<&LearningStore>
LearningStore を取得
Sourcepub fn offline_model(&self) -> Option<&OfflineModel>
pub fn offline_model(&self) -> Option<&OfflineModel>
Offline model を取得
Sourcepub fn is_learning_enabled(&self) -> bool
pub fn is_learning_enabled(&self) -> bool
学習機能が有効かどうか
Sourcepub fn take_shutdown_tx(&mut self) -> Option<Sender<()>>
pub fn take_shutdown_tx(&mut self) -> Option<Sender<()>>
Shutdown 送信チャンネルを取得(所有権を移動)
非同期 shutdown が不可能な環境(tokio runtime 内での block_on)で使用。
取得後、try_send(()) でシャットダウン信号を送信し、Drop で cleanup。
Sourcepub async fn shutdown(self)
pub async fn shutdown(self)
Graceful shutdown
LearningDaemon と Subscriber を停止し、完了を待つ。 学習が有効な場合、shutdown 前に LearnStatsSnapshot Event を発行する。
Sourcepub fn shutdown_blocking(self)
pub fn shutdown_blocking(self)
同期的な shutdown(blocking)
Auto Trait Implementations§
impl Freeze for LearnableSwarm
impl !RefUnwindSafe for LearnableSwarm
impl Send for LearnableSwarm
impl Sync for LearnableSwarm
impl Unpin for LearnableSwarm
impl !UnwindSafe for LearnableSwarm
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 more