wslplugins_rs/api/mod.rs
1//! # API Module
2//!
3//! This module provides the core functionality for interacting with the WSL plugin API.
4//! It includes abstractions for API interactions, error handling, and utility functions.
5
6mod api_v1;
7pub mod errors;
8pub use wsl_command::WSLCommandExecution;
9
10/// The `ApiV1` struct provides an interface to interact with version 1 of the WSL Plugin API.
11///
12/// It encapsulates low-level interactions with the API and exposes a safe and idiomatic Rust interface.
13pub use api_v1::ApiV1;
14
15/// The `Error` type represents errors that may occur while using the WSL Plugin API.
16///
17/// This type encapsulates various error scenarios, providing a consistent and ergonomic way
18/// to handle failures.
19pub use errors::Error;
20
21/// A specialized `Result` type for operations that may fail in the context of the WSL Plugin API.
22///
23/// This alias simplifies the function signatures by standardizing error handling.
24pub use errors::Result;
25
26/// The `utils` module provides utility functions and helpers for working with the WSL Plugin API.
27///
28/// These utilities simplify common tasks, such as version checking or string manipulation.
29pub mod utils;
30mod wsl_command;
31/// The `PreparedWSLCommand` struct represents a command that has been prepared for execution within the WSL environment and can be reused without re-encoding.
32pub use wsl_command::PreparedWSLCommand;
33/// The `WSLCommand` struct represents a command that can be executed within the WSL environment.
34pub use wsl_command::WSLCommand;