Crate atlas_ctx

Crate atlas_ctx 

Source
Expand description

§atlas-ctx

An experimental asynchronous task context management library for Rust.

§⚠️ Experimental Warning

This library is experimental and unstable. The API may change significantly between versions. Use in production at your own risk.

§Overview

atlas-ctx provides hierarchical task context management for async Rust applications, built on top of Tokio. It offers:

  • Hierarchical task contexts - Parent-child task relationships
  • Cancellation propagation - Cancel tasks and their children
  • Pause/resume - Pause and resume task execution
  • Result collection - Collect results from child tasks via collect::CollectScope
  • Semaphore control - Concurrency limiting with sem::Sem
  • Scope values - Share values within task scopes
  • Logging - Customizable logging via logger::Logger

§Quick Start

use atlas::{Atlas, Builder};

#[tokio::main]
async fn main() {
    let atlas = Builder::new().build();
    // Use atlas for task context management
}

Modules§

collect
logger
sem

Structs§

Atlas
Atlas - 汎用非同期管理ライブラリ AtlasCoreをArcで内部に持ち、選択的にメソッドを公開するラッパー
Builder
Atlasを構築するためのビルダー 各コンポーネントを段階的に設定し、最終的にAtlasを生成する
ChildBuilder
子Atlasを構築するためのビルダー 親Atlasの情報を保持し、継承関係を管理する
ChildrenStat
Ptm
AtlasCoreにおける無効状態のコンポーネント実装
RefForChild

Enums§

CancelCause
CancelState
キャンセル状態(論理的に動作しているか)
ErrEscalation
エラーの逆伝播制御(子から親への伝播)
PauseState
ポーズ状態

Traits§

ErrBound
エラー型の境界(自動実装)
PauseCauseBound
ポーズの原因型の境界(自動実装)
ScopeValueBound
スコープ値の境界(自動実装)

Type Aliases§

ErrConverter