## Config

# Struct Config

Source

    pub struct Config {Show 85 fields
        pub bless: bool,
        pub fail_fast: bool,
        pub compile_lib_path: Utf8PathBuf,
        pub run_lib_path: Utf8PathBuf,
        pub rustc_path: Utf8PathBuf,
        pub cargo_path: Option<Utf8PathBuf>,
        pub stage0_rustc_path: Option<Utf8PathBuf>,
        pub query_rustc_path: Option<Utf8PathBuf>,
        pub rustdoc_path: Option<Utf8PathBuf>,
        pub coverage_dump_path: Option<Utf8PathBuf>,
        pub python: String,
        pub jsondocck_path: Option<String>,
        pub jsondoclint_path: Option<String>,
        pub llvm_filecheck: Option<Utf8PathBuf>,
        pub llvm_bin_dir: Option<Utf8PathBuf>,
        pub run_clang_based_tests_with: Option<String>,
        pub src_root: Utf8PathBuf,
        pub src_test_suite_root: Utf8PathBuf,
        pub build_root: Utf8PathBuf,
        pub build_test_suite_root: Utf8PathBuf,
        pub sysroot_base: Utf8PathBuf,
        pub stage: u32,
        pub stage_id: String,
        pub mode: TestMode,
        pub suite: TestSuite,
        pub debugger: Option<Debugger>,
        pub run_ignored: bool,
        pub with_rustc_debug_assertions: bool,
        pub with_std_debug_assertions: bool,
        pub filters: Vec<String>,
        pub skip: Vec<String>,
        pub filter_exact: bool,
        pub force_pass_mode: Option<PassMode>,
        pub run: Option<bool>,
        pub runner: Option<String>,
        pub host_rustcflags: Vec<String>,
        pub target_rustcflags: Vec<String>,
        pub rust_randomized_layout: bool,
        pub optimize_tests: bool,
        pub target: String,
        pub host: String,
        pub cdb: Option<Utf8PathBuf>,
        pub cdb_version: Option<[u16; 4]>,
        pub gdb: Option<String>,
        pub gdb_version: Option<u32>,
        pub lldb_version: Option<u32>,
        pub llvm_version: Option<Version>,
        pub system_llvm: bool,
        pub android_cross_path: Utf8PathBuf,
        pub adb_path: String,
        pub adb_test_dir: String,
        pub adb_device_status: bool,
        pub lldb_python_dir: Option<String>,
        pub verbose: bool,
        pub color: ColorConfig,
        pub remote_test_client: Option<Utf8PathBuf>,
        pub compare_mode: Option<CompareMode>,
        pub rustfix_coverage: bool,
        pub has_html_tidy: bool,
        pub has_enzyme: bool,
        pub channel: String,
        pub git_hash: bool,
        pub edition: Option<Edition>,
        pub cc: String,
        pub cxx: String,
        pub cflags: String,
        pub cxxflags: String,
        pub ar: String,
        pub target_linker: Option<String>,
        pub host_linker: Option<String>,
        pub llvm_components: String,
        pub nodejs: Option<String>,
        pub force_rerun: bool,
        pub only_modified: bool,
        pub target_cfgs: OnceLock<TargetCfgs>,
        pub builtin_cfg_names: OnceLock<HashSet<String>>,
        pub supported_crate_types: OnceLock<HashSet<String>>,
        pub nocapture: bool,
        pub nightly_branch: String,
        pub git_merge_commit_email: String,
        pub profiler_runtime: bool,
        pub diff_command: Option<String>,
        pub minicore_path: Utf8PathBuf,
        pub default_codegen_backend: CodegenBackend,
        pub override_codegen_backend: Option<String>,
    }

Expand description

Configuration for `compiletest` per invocation.

In terms of `bootstrap`, this means that `./x test tests/ui tests/run-make` actually correspond to two separate invocations of `compiletest`.

FIXME: this `Config` struct should be broken up into smaller logically contained sub-config structs, it’s too much of a “soup” of everything at the moment.

## §Configuration sources

Configuration values for `compiletest` comes from several sources:

- CLI args passed from `bootstrap` while running the `compiletest` binary.
- Env vars.
- Discovery (e.g. trying to identify a suitable debugger based on filesystem discovery).
- Cached output of running the `rustc` under test (e.g. output of `rustc` print requests).

FIXME: make sure we clearly account for sources of all config options.

FIXME: audit these options to make sure we are not hashing less than necessary for build stamp (for changed test detection).

## Fields§

§`bless: bool`

Some `TestMode`s support snapshot testing, where a reference snapshot of outputs (of `stdout`, `stderr`, or other form of artifacts) can be compared to the actual output.

This option can be set to `true` to update the reference snapshots in-place, otherwise `compiletest` will only try to compare.

§`fail_fast: bool`

Attempt to stop as soon as possible after any test fails. We may still run a few more tests before stopping when multiple test threads are used.

§`compile_lib_path: Utf8PathBuf`

Path to libraries needed to run the staged `rustc`-under-test on the host platform.

FIXME: maybe rename this to reflect (1) which target platform (host, not target), and (2) which `rustc` (the `rustc`-under-test, not the stage 0 `rustc` unless forced).

§`run_lib_path: Utf8PathBuf`

Path to libraries needed to run the compiled executable for the target platform. This corresponds to the target sysroot libraries, including the target standard library.

FIXME: maybe rename this to reflect (1) which target platform (target, not host), and (2) what “run libraries” are against.

FIXME: this is very under-documented in conjunction with the `remote-test-client` scheme and `RUNNER` scheme to actually run the target executable under the target platform environment, cf. `Self::remote_test_client` and `Self::runner`.

§`rustc_path: Utf8PathBuf`

Path to the staged `rustc`-under-test. Unless forced, this `rustc` is staged, and must not be confused with `Self::stage0_rustc_path`.

FIXME: maybe rename this to reflect that this is the `rustc`-under-test.

§`cargo_path: Option<Utf8PathBuf>`

Path to a staged host platform cargo executable (unless stage 0 is forced). This staged `cargo` is only used within `run-make` test recipes during recipe run time (and is not used to compile the test recipes), and so must be staged as there may be differences between e.g. beta `cargo` vs in-tree `cargo`.

FIXME: maybe rename this to reflect that this is a staged host cargo.

§`stage0_rustc_path: Option<Utf8PathBuf>`

Path to the stage 0 `rustc` used to build `run-make` recipes. This must not be confused with `Self::rustc_path`.

§`query_rustc_path: Option<Utf8PathBuf>`

Path to the stage 1 or higher `rustc` used to obtain target information via `--print=all-target-specs-json` and similar queries.

Normally this is unset, because `Self::rustc_path` can be used instead. But when running “stage 1” ui-fulldeps tests, `rustc_path` is a stage 0 compiler, whereas target specs must be obtained from a stage 1+ compiler (in case the JSON format has changed since the last bootstrap bump).

§`rustdoc_path: Option<Utf8PathBuf>`

Path to the `rustdoc`-under-test. Like `Self::rustc_path`, this `rustdoc` is staged.

§`coverage_dump_path: Option<Utf8PathBuf>`

Path to the `src/tools/coverage-dump/` bootstrap tool executable.

§`python: String`

Path to the Python 3 executable to use for LLDB and htmldocck.

FIXME: the `lldb` setup currently requires I believe Python 3.10 exactly, it can’t even be Python 3.11 or 3.9…

§`jsondocck_path: Option<String>`

Path to the `src/tools/jsondocck/` bootstrap tool executable.

§`jsondoclint_path: Option<String>`

Path to the `src/tools/jsondoclint/` bootstrap tool executable.

§`llvm_filecheck: Option<Utf8PathBuf>`

Path to a host LLVM `FileCheck` executable.

§`llvm_bin_dir: Option<Utf8PathBuf>`

Path to a host LLVM bintools directory.

§`run_clang_based_tests_with: Option<String>`

The path to the target `clang` executable to run `clang`-based tests with. If `None`, then these tests will be ignored.

§`src_root: Utf8PathBuf`

Path to the directory containing the sources. This corresponds to the root folder of a `rust-lang/rust` checkout.

FIXME: this name is confusing, because this is actually `$checkout_root`, not the `$checkout_root/src/` folder.

§`src_test_suite_root: Utf8PathBuf`

Path to the directory containing the test suites sources. This corresponds to the `$src_root/tests/` folder.

Must be an immediate subdirectory of `Self::src_root`.

FIXME: this name is also confusing, maybe just call it `tests_root`.

§`build_root: Utf8PathBuf`

Path to the build directory (e.g. `build/`).

§`build_test_suite_root: Utf8PathBuf`

Path to the test suite specific build directory (e.g. `build/host/test/ui/`).

Must be a subdirectory of `Self::build_root`.

§`sysroot_base: Utf8PathBuf`

Path to the directory containing the sysroot of the `rustc`-under-test.

When stage 0 is forced, this will correspond to the sysroot of that specified stage 0 `rustc`.

FIXME: this name is confusing, because it doesn’t specify which compiler this sysroot corresponds to. It’s actually the `rustc`-under-test, and not the bootstrap `rustc`, unless stage 0 is forced and no custom stage 0 `rustc` was otherwise specified (so that it happens to run against the bootstrap `rustc`, but this non-custom bootstrap `rustc` case is not really supported).

§`stage: u32`

The number of the stage under test.

§`stage_id: String`

The id of the stage under test (stage1-xxx, etc).

FIXME: reconsider this string; this is hashed for test build stamp.

§`mode: TestMode`

The `TestMode`. E.g. `TestMode::Ui`. Each test mode can correspond to one or more test suites.

FIXME: stop using stringly-typed test suites!

§`suite: TestSuite`

The test suite.

Example: `tests/ui/` is `TestSuite::Ui` test suite, which happens to also be of the `TestMode::Ui` test mode.

Note that the same test suite (e.g. `tests/coverage/`) may correspond to multiple test modes, e.g. `tests/coverage/` can be run under both `TestMode::CoverageRun` and `TestMode::CoverageMap`.

§`debugger: Option<Debugger>`

When specified, only the specified `Debugger` will be used to run against the `tests/debuginfo` test suite. When unspecified, `compiletest` will attempt to find all three of {`lldb`, `cdb`, `gdb`} implicitly, and then try to run the `debuginfo` test suite against all three debuggers.

FIXME: this implicit behavior is really nasty, in that it makes it hard for the user to control which debugger(s) are available and used to run the debuginfo test suite. We should have `bootstrap` allow the user to explicitly configure the debuggers, and not try to implicitly discover some random debugger from the user environment. This makes the debuginfo test suite particularly hard to work with.

§`run_ignored: bool`

Run ignored tests unconditionally, overriding their ignore reason.

FIXME: this is wired up through the test execution logic, but not accessible from `bootstrap` directly; `compiletest` exposes this as `--ignored`. I.e. you’d have to use `./x test $test_suite -- --ignored=true`.

§`with_rustc_debug_assertions: bool`

Whether staged `rustc`-under-test was built with debug assertions.

FIXME: make it clearer that this refers to the staged `rustc`-under-test, not stage 0 `rustc`.

§`with_std_debug_assertions: bool`

Whether staged `std` was built with debug assertions.

FIXME: make it clearer that this refers to the staged `std`, not stage 0 `std`.

§`filters: Vec<String>`

Only run tests that match these filters (using `libtest` “test name contains” filter logic).

FIXME(#139660): the current hand-rolled test executor intentionally mimics the `libtest` “test name contains” filter matching logic to preserve previous `libtest` executor behavior, but this is often not intuitive. We should consider changing that behavior with an MCP to do test path prefix matching which better corresponds to how `compiletest` `tests/` are organized, and how users would intuitively expect the filtering logic to work like.

§`skip: Vec<String>`

Skip tests matching these substrings. The matching logic exactly corresponds to `Self::filters` but inverted.

FIXME(#139660): ditto on test matching behavior.

§`filter_exact: bool`

Exactly match the filter, rather than a substring.

FIXME(#139660): ditto on test matching behavior.

§`force_pass_mode: Option<PassMode>`

Force the pass mode of a check/build/run test to instead use this mode instead.

FIXME: make it even more obvious (especially in PR CI where `--pass=check` is used) when a pass mode is forced when the test fails, because it can be very non-obvious when e.g. an error is emitted only when `//@ build-pass` but not `//@ check-pass`.

§`run: Option<bool>`

Explicitly enable or disable running of the target test binary.

FIXME: this scheme is a bit confusing, and at times questionable. Re-evaluate this run scheme.

FIXME: Currently `--run` is a tri-state, it can be `--run={auto,always,never}`, and when `--run=auto` is specified, it’s run if the platform doesn’t end with `-fuchsia`. See `Config::run_enabled`.

§`runner: Option<String>`

A command line to prefix target program execution with, for running under valgrind for example, i.e. `$runner target.exe [args..]`. Similar to `CARGO_*_RUNNER` configuration.

Note: this is not to be confused with `Self::remote_test_client`, which is a different scheme.

FIXME: the runner scheme is very under-documented.

§`host_rustcflags: Vec<String>`

Compiler flags to pass to the staged `rustc`-under-test when building for the host platform.

§`target_rustcflags: Vec<String>`

Compiler flags to pass to the staged `rustc`-under-test when building for the target platform.

§`rust_randomized_layout: bool`

Whether the staged `rustc`-under-test and the associated staged `std` has been built with randomized struct layouts.

§`optimize_tests: bool`

Whether tests should be optimized by default (`-O`). Individual test suites and test files may override this setting.

FIXME: this flag / config option is somewhat misleading. For instance, in ui tests, it’s only applied to the `PassMode::Run` test crate and not its auxiliaries.

§`target: String`

Target platform tuple.

§`host: String`

Host platform tuple.

§`cdb: Option<Utf8PathBuf>`

Path to / name of the Microsoft Console Debugger (CDB) executable.

FIXME: this is an opt-in “override” option. When this isn’t provided, we try to conjure a cdb by looking at the user’s program files on Windows… See `debuggers::find_cdb`.

§`cdb_version: Option<[u16; 4]>`

Version of CDB.

FIXME: `cdb_version` is derived from cdb, but it’s not technically a config!

FIXME: audit cdb version gating.

§`gdb: Option<String>`

Path to / name of the GDB executable.

FIXME: the fallback path when `gdb` isn’t provided tries to find a `gdb` or `gdb.exe` from `PATH`, which is… arguably questionable.

FIXME: we are propagating a python from `PYTHONPATH`, not from an explicit config for gdb debugger script.

§`gdb_version: Option<u32>`

Version of GDB, encoded as ((major * 1000) + minor) * 1000 + patch

FIXME: this gdb version gating scheme is possibly questionable – gdb does not use semver, only its major version is likely materially meaningful, cf. https://sourceware.org/gdb/wiki/Internals%20Versions. Even the major version I’m not sure is super meaningful. Maybe min gdb `major.minor` version gating is sufficient for the purposes of debuginfo tests?

FIXME: `gdb_version` is derived from gdb, but it’s not technically a config!

§`lldb_version: Option<u32>`

Version of LLDB.

FIXME: `lldb_version` is derived from lldb, but it’s not technically a config!

§`llvm_version: Option<Version>`

Version of LLVM.

FIXME: Audit the fallback derivation of `crate::directives::extract_llvm_version_from_binary`, that seems very questionable?

§`system_llvm: bool`

Is LLVM a system LLVM.

§`android_cross_path: Utf8PathBuf`

Path to the android tools.

Note: this is only used for android gdb debugger script in the debuginfo test suite.

FIXME: take a look at this; this is piggy-backing off of gdb code paths but only for `arm-linux-androideabi` target.

§`adb_path: String`

Extra parameter to run adb on `arm-linux-androideabi`.

FIXME: is this only `arm-linux-androideabi`, or is it also for other Tier 2/3 android targets?

FIXME: take a look at this; this is piggy-backing off of gdb code paths but only for `arm-linux-androideabi` target.

§`adb_test_dir: String`

Extra parameter to run test suite on `arm-linux-androideabi`.

FIXME: is this only `arm-linux-androideabi`, or is it also for other Tier 2/3 android targets?

FIXME: take a look at this; this is piggy-backing off of gdb code paths but only for `arm-linux-androideabi` target.

§`adb_device_status: bool`

Status whether android device available or not. When unavailable, this will cause tests to panic when the test binary is attempted to be run.

FIXME: take a look at this; this also influences adb in gdb code paths in a strange way.

§`lldb_python_dir: Option<String>`

Path containing LLDB’s Python module.

FIXME: `PYTHONPATH` takes precedence over this flag…? See `runtest::run_lldb`.

§`verbose: bool`

Verbose dump a lot of info.

FIXME: this is way too coarse; the user can’t select which info to verbosely dump.

§`color: ColorConfig`

Whether to use colors in test output.

Note: the exact control mechanism is delegated to [`colored`].

§`remote_test_client: Option<Utf8PathBuf>`

Where to find the remote test client process, if we’re using it.

Note: this is only used for target platform executables created by `run-make` test recipes.

Note: this is not to be confused with `Self::runner`, which is a different scheme.

FIXME: the `remote_test_client` scheme is very under-documented.

§`compare_mode: Option<CompareMode>`

`CompareMode` describing what file the actual ui output will be compared to.

FIXME: currently, `CompareMode` is a mishmash of lot of things (different borrow-checker model, different trait solver, different debugger, etc.).

§`rustfix_coverage: bool`

If true, this will generate a coverage file with UI test files that run `MachineApplicable` diagnostics but are missing `run-rustfix` annotations. The generated coverage file is created in `$test_suite_build_root/rustfix_missing_coverage.txt`

§`has_html_tidy: bool`

Whether to run `tidy` (html-tidy) when a rustdoc test fails.

§`has_enzyme: bool`

Whether to run `enzyme` autodiff tests.

§`channel: String`

The current Rust channel info.

FIXME: treat this more carefully; “stable”, “beta” and “nightly” are definitely valid, but channel might also be “dev” or such, which should be treated as “nightly”.

§`git_hash: bool`

Whether adding git commit information such as the commit hash has been enabled for building.

FIXME: `compiletest` cannot trust `bootstrap` for this information, because `bootstrap` can have bugs and had bugs on that logic. We need to figure out how to obtain this e.g. directly from CI or via git locally.

§`edition: Option<Edition>`

The default Rust edition.

§`cc: String`§`cxx: String`§`cflags: String`§`cxxflags: String`§`ar: String`§`target_linker: Option<String>`§`host_linker: Option<String>`§`llvm_components: String`§`nodejs: Option<String>`

Path to a NodeJS executable. Used for JS doctests, emscripten and WASM tests.

§`force_rerun: bool`

Whether to rerun tests even if the inputs are unchanged.

§`only_modified: bool`

Only rerun the tests that result has been modified according to `git status`.

FIXME: this is undocumented.

FIXME: how does this interact with `Self::force_rerun`?

§`target_cfgs: OnceLock<TargetCfgs>`§`builtin_cfg_names: OnceLock<HashSet<String>>`§`supported_crate_types: OnceLock<HashSet<String>>`§`nocapture: bool`

FIXME: rename this to the more canonical `no_capture`, or better, invert this to `capture` to avoid `!nocapture` double-negatives.

§`nightly_branch: String`

Needed both to construct `build_helper::git::GitConfig`.

§`git_merge_commit_email: String`§`profiler_runtime: bool`

True if the profiler runtime is enabled for this target. Used by the `needs-profiler-runtime` directive in test files.

§`diff_command: Option<String>`

Command for visual diff display, e.g. `diff-tool --color=always`.

§`minicore_path: Utf8PathBuf`

Path to minicore aux library (`tests/auxiliary/minicore.rs`), used for `no_core` tests that need `core` stubs in cross-compilation scenarios that do not otherwise want/need to `-Zbuild-std`. Used in e.g. ABI tests.

§`default_codegen_backend: CodegenBackend`

Current codegen backend used.

§`override_codegen_backend: Option<String>`

Name/path of the backend to use instead of `default_codegen_backend`.

## Implementations§

Source§

### impl Config

Source

#### pub fn run_enabled(&self) -> bool

FIXME: this run scheme is… confusing.

Source

#### pub fn target_cfgs(&self) -> &TargetCfgs

Source

#### pub fn target_cfg(&self) -> &TargetCfg

Source

#### pub fn matches_arch(&self, arch: &str) -> bool

Source

#### pub fn matches_os(&self, os: &str) -> bool

Source

#### pub fn matches_env(&self, env: &str) -> bool

Source

#### pub fn matches_abi(&self, abi: &str) -> bool

Source

#### pub(crate) fn matches_family(&self, family: &str) -> bool

Source

#### pub fn is_big_endian(&self) -> bool

Source

#### pub fn get_pointer_width(&self) -> u32

Source

#### pub fn can_unwind(&self) -> bool

Source

#### pub fn builtin_cfg_names(&self) -> &HashSet<String>

Get the list of builtin, ‘well known’ cfg names

Source

#### pub fn supported_crate_types(&self) -> &HashSet<String>

Get the list of crate types that the target platform supports.

Source

#### pub fn has_threads(&self) -> bool

Source

#### pub fn has_asm_support(&self) -> bool

Source

#### pub fn git_config(&self) -> GitConfig<'_>

Source

#### pub fn has_subprocess_support(&self) -> bool

Source§

### impl Config

Source

#### fn parse_and_update_revisions( &self, line: &DirectiveLine<'_>, existing: &mut Vec<String>, )

Source

#### fn parse_env(nv: String) -> (String, String)

Source

#### fn parse_pp_exact(&self, line: &DirectiveLine<'_>) -> Option<Utf8PathBuf>

Source

#### fn parse_custom_normalization( &self, line: &DirectiveLine<'_>, ) -> Option<NormalizeRule>

Source

#### fn parse_name_directive( &self, line: &DirectiveLine<'_>, directive: &str, ) -> bool

Source

#### fn parse_name_value_directive( &self, line: &DirectiveLine<'_>, directive: &str, ) -> Option<String>

Source

#### fn set_name_directive( &self, line: &DirectiveLine<'_>, directive: &str, value: &mut bool, )

Source

#### fn set_name_value_directive<T>( &self, line: &DirectiveLine<'_>, directive: &str, value: &mut Option<T>, parse: impl FnOnce(String) -> T, )

Source

#### fn push_name_value_directive<T>( &self, line: &DirectiveLine<'_>, directive: &str, values: &mut Vec<T>, parse: impl FnOnce(String) -> T, )

## Trait Implementations§

Source§

### impl Clone for Config

Source§

#### fn clone(&self) -> Config

Returns a duplicate of the value. Read more
1.0.0 · Source§

#### fn clone_from(&mut self, source: &Self)

Performs copy-assignment from `source`. Read more
Source§

### impl Debug for Config

Source§

#### fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

## Auto Trait Implementations§

§

### impl !Freeze for Config

§

### impl RefUnwindSafe for Config

§

### impl Send for Config

§

### impl Sync for Config

§

### impl Unpin for Config

§

### impl UnwindSafe for Config

## Blanket Implementations§

Source§

### impl<T> Any for T
where T: 'static + ?Sized,

Source§

#### fn type_id(&self) -> TypeId

Gets the `TypeId` of `self`. Read more
Source§

### impl<T> Borrow<T> for T
where T: ?Sized,

Source§

#### fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

### impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

#### fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

### impl<T> CloneToUninit for T
where T: Clone,

Source§

#### unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (`clone_to_uninit`)
Performs copy-assignment from `self` to `dest`. Read more
Source§

### impl<T> From<T> for T

Source§

#### fn from(t: T) -> T

Returns the argument unchanged.

§

### impl<T> Instrument for T

§

#### fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [`Span`], returning an `Instrumented` wrapper. Read more
§

#### fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current `Span`, returning an `Instrumented` wrapper. Read more
Source§

### impl<T, U> Into<U> for T
where U: From<T>,

Source§

#### fn into(self) -> U

Calls `U::from(self)`.

That is, this conversion is whatever the implementation of `From<T> for U` chooses to do.

Source§

### impl<T> IntoEither for T

Source§

#### 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 more
Source§

#### fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

### impl<T> Pointable for T

§

#### const ALIGN: usize

The alignment of pointer.
§

#### type Init = T

The type for initializers.
§

#### unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

#### unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

#### unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

#### unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

### impl<T> ToOwned for T
where T: Clone,

Source§

#### type Owned = T

The resulting type after obtaining ownership.
Source§

#### fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

#### fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

### impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

#### type Error = Infallible

The type returned in the event of a conversion error.
Source§

#### fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

### impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

#### type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

#### fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

### impl<T> WithSubscriber for T

§

#### fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided `Subscriber` to this type, returning a [`WithDispatch`] wrapper. Read more
§

#### fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default `Subscriber` to this type, returning a [`WithDispatch`] wrapper. Read more

## Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain `repr(...)` attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 2064 bytes