uv/crates/uv-python/src/pointer_size.rs
Zanie Blue dd7da6af5f
Change "toolchain" to "python" (#4735)
Whew this is a lot.

The user-facing changes are:

- `uv toolchain` to `uv python` e.g. `uv python find`, `uv python
install`, ...
- `UV_TOOLCHAIN_DIR` to` UV_PYTHON_INSTALL_DIR`
- `<UV_STATE_DIR>/toolchains` to `<UV_STATE_DIR>/python` (with
[automatic
migration](https://github.com/astral-sh/uv/pull/4735/files#r1663029330))
- User-facing messages no longer refer to toolchains, instead using
"Python", "Python versions" or "Python installations"

The internal changes are:

- `uv-toolchain` crate to `uv-python`
- `Toolchain` no longer referenced in type names
- Dropped unused `SystemPython` type (previously replaced)
- Clarified the type names for "managed Python installations"
- (more little things)
2024-07-03 07:44:29 -05:00

21 lines
430 B
Rust

use serde::{Deserialize, Serialize};
#[derive(Debug, Copy, Clone, Serialize, Deserialize)]
pub enum PointerSize {
/// 32-bit architecture.
#[serde(rename = "32")]
_32,
/// 64-bit architecture.
#[serde(rename = "64")]
_64,
}
impl PointerSize {
pub const fn is_32(self) -> bool {
matches!(self, Self::_32)
}
pub const fn is_64(self) -> bool {
matches!(self, Self::_64)
}
}