Expand description
Microsoft.WSL.Containers (WSLC) 官方 SDK 安全 Rust 抽象门面
基于官方 3.0.1 GA SDK 构建,提供具备 RAII 自动资源释放、强类型错误模型与并发安全保障的统一客户端接口。
§平台要求
本 crate 深度依赖 Win32 COM/RPC 与系统组件 wslcsdk.dll,仅支持 Windows 平台。
在非 Windows 目标上编译会立即得到一条明确的 compile_error! 提示,
而非在 std::os::windows 等处报出难以定位的错误。
Re-exports§
pub use channel::AsyncReceiver;Windows pub use channel::AsyncRecvError;Windows pub use client::WslcClient;Windows pub use client::WslcClientBuilder;Windows pub use com::ComGuard;Windows pub use com::ProcessMtaGuard;Windows pub use com::init_process_mta;Windows pub use com::try_initialize_mta;Windows pub use com::with_mta;Windows pub use com_memory::ComAnsiString;Windows pub use com_memory::ComArray;Windows pub use com_memory::ComWideString;Windows pub use container::ContainerBuilder;Windows pub use container::ContainerPortMappingData;Windows pub use container::WslcContainerHandle;Windows pub use error::WslcDomainError;Windows pub use error::WslcError;Windows pub use image::ImageInfo;Windows pub use image::ImageProgress;Windows pub use image::OwnedImageProgress;Windows pub use image::WslcImageManager;Windows pub use process::ProcessBuilder;Windows pub use process::ProcessStreams;Windows pub use process::WslcProcessHandle;Windows pub use registry::AuthTokenResult;Windows pub use registry::WslcRegistryManager;Windows pub use session::CrashDumpSubscription;Windows pub use session::SessionBuilder;Windows pub use session::WslcSessionHandle;Windows pub use session::default_session_root;Windows pub use system::WslcSystem;Windows pub use volume::VhdVolumeOptions;Windows pub use volume::WslcVolumeManager;Windows
Modules§
- async_
ops Windows - 面向 Tokio 运行时的异步非阻塞扩展
- channel
Windows - 异步有界通道接收端的安全包装
- client
Windows - WSLC 统一高层门面客户端
- com
Windows - Windows COM 多线程套间 (MTA) RAII 守卫与进程级上下文管理
- com_
memory Windows - 由 COM 堆分配的原始指针的 RAII 托管
- container
Windows - WSLC 容器设置建造者与容器生命周期控制
- error
Windows - WSLC 安全错误类型与 Win32 HRESULT 解析器
- image
Windows - WSLC 镜像枚举、远程拉取、推送与归档载入
- process
Windows - WSLC 容器内进程创建、信号分发与标准 I/O 交互
- registry
Windows - WSLC 镜像仓库鉴权与 Identity Token 生成
- session
Windows - WSLC 会话生命周期管理
- system
Windows - WSLC 系统服务门面:版本查询、组件缺失检测与依赖安装
- volume
Windows - WSLC 会话持久化 VHD 存储卷管理
Structs§
- Wslc
Container Port Mapping Windows - 容器端口映射配置
- Wslc
Version Windows - WSLC 系统版本号
Enums§
- Wslc
Container Networking Mode Windows - 容器网络模式
- Wslc
Container State Windows - 容器运行状态
- Wslc
Identity Token Type Windows - 身份认证令牌返回类型
- Wslc
Image Progress Status Windows - 镜像拉取进度阶段状态
- Wslc
Port Protocol Windows - 端口映射协议类型
- Wslc
ProcessIO Handle Windows - 进程标准 IO 流类型
- Wslc
Process State Windows - 进程运行状态
- Wslc
Session Termination Reason Windows - 会话退出原因枚举
- Wslc
Signal Windows - Linux 信号枚举
- Wslc
VhdType Windows - VHD 虚拟磁盘分配类型
Constants§
- WSLC_
E_ BASE Windows - WSLC 基础错误偏移码 (0x0600)
- WSLC_
E_ CONTAINER_ DELETED Windows - 容器已被删除 (0x80040613)
- WSLC_
E_ CONTAINER_ DISABLED Windows - 容器功能被系统或安全策略禁用 (0x8004060C)
- WSLC_
E_ CONTAINER_ IS_ RUNNING Windows - 容器已处于运行状态 (0x80040606)
- WSLC_
E_ CONTAINER_ NOT_ FOUND Windows - 容器未找到 (0x80040603)
- WSLC_
E_ CONTAINER_ NOT_ RUNNING Windows - 容器当前未处于运行状态 (0x80040605)
- WSLC_
E_ CONTAINER_ PREFIX_ AMBIGUOUS Windows - 容器 ID 前缀存在歧义,匹配到多个容器 (0x80040602)
- WSLC_
E_ EVENTS_ LOST Windows - 事件队列溢出,部分事件已丢失 (0x80040611)
- WSLC_
E_ EVENT_ STREAM_ FINISHED Windows - 事件流已传输完毕 (0x80040612)
- WSLC_
E_ IMAGE_ NOT_ FOUND Windows - 镜像未找到 (0x80040601)
- WSLC_
E_ INVALID_ SESSION_ NAME Windows - 会话名称格式不合法 (0x80040608)
- WSLC_
E_ NETWORK_ NOT_ FOUND Windows - 网络未找到 (0x80040609)
- WSLC_
E_ REGISTRY_ BLOCKED_ BY_ POLICY Windows - 镜像仓库访问被安全策略拦截 (0x8004060D)
- WSLC_
E_ SDK_ UPDATE_ NEEDED Windows - SDK 版本落后,需要更新 (0x8004060B)
- WSLC_
E_ SESSION_ NOT_ FOUND Windows - 会话未找到 (0x8004060F)
- WSLC_
E_ SESSION_ RESERVED Windows - 会话名称属于系统保留名称,不可使用 (0x80040607)
- WSLC_
E_ VM_ NOT_ RUNNING Windows - WSL 虚拟机未在运行 (0x80040610)
- WSLC_
E_ VOLUME_ NOT_ AVAILABLE Windows - 存储卷当前不可用或被独占占用 (0x8004060E)
- WSLC_
E_ VOLUME_ NOT_ FOUND Windows - 卷未找到 (0x80040604)
- WSLC_
E_ WU_ SEARCH_ FAILED Windows - Windows Update 搜索依赖组件失败 (0x8004060A)
Type Aliases§
- Wslc
Component Flags Windows - 系统缺失组件标志位
- Wslc
Container Flags Windows - 容器特性标志位
- Wslc
Container Start Flags Windows - 容器启动标志位
- Wslc
Delete Container Flags Windows - 容器删除标志位
- Wslc
Install Options Windows - 组件安装选项标志位
- Wslc
Process Flags Windows - 进程选项标志位
- Wslc
Session Feature Flags Windows - 会话特性标志位
- Wslc
VhdRequirements Flags Windows - VHD 要求标志位