## Config

# Struct Config

Source

    pub struct Config {Show 181 fields
        pub change_id: Option<ChangeId>,
        pub bypass_bootstrap_lock: bool,
        pub ccache: Option<String>,
        pub ninja_in_file: bool,
        pub submodules: Option<bool>,
        pub compiler_docs: bool,
        pub library_docs_private_items: bool,
        pub docs_minification: bool,
        pub docs: bool,
        pub locked_deps: bool,
        pub vendor: bool,
        pub target_config: HashMap<TargetSelection, Target>,
        pub full_bootstrap: bool,
        pub bootstrap_cache_path: Option<PathBuf>,
        pub extended: bool,
        pub tools: Option<HashSet<String>>,
        pub tool: HashMap<String, Tool>,
        pub sanitizers: bool,
        pub profiler: bool,
        pub omit_git_hash: bool,
        pub skip: Vec<PathBuf>,
        pub include_default_paths: bool,
        pub rustc_error_format: Option<String>,
        pub json_output: bool,
        pub compile_time_deps: bool,
        pub test_compare_mode: bool,
        pub color: Color,
        pub patch_binaries_for_nix: Option<bool>,
        pub stage0_metadata: Stage0,
        pub android_ndk: Option<PathBuf>,
        pub optimized_compiler_builtins: CompilerBuiltins,
        pub stdout_is_tty: bool,
        pub stderr_is_tty: bool,
        pub on_fail: Option<String>,
        pub explicit_stage_from_cli: bool,
        pub explicit_stage_from_config: bool,
        pub stage: u32,
        pub keep_stage: Vec<u32>,
        pub keep_stage_std: Vec<u32>,
        pub src: PathBuf,
        pub config: Option<PathBuf>,
        pub jobs: Option<u32>,
        pub cmd: Subcommand,
        pub incremental: bool,
        pub dump_bootstrap_shims: bool,
        pub free_args: Vec<String>,
        pub download_rustc_commit: Option<String>,
        pub deny_warnings: bool,
        pub backtrace_on_ice: bool,
        pub llvm_assertions: bool,
        pub llvm_tests: bool,
        pub llvm_enzyme: bool,
        pub llvm_offload: bool,
        pub llvm_plugins: bool,
        pub llvm_optimize: bool,
        pub llvm_thin_lto: bool,
        pub llvm_release_debuginfo: bool,
        pub llvm_static_stdcpp: bool,
        pub llvm_libzstd: bool,
        pub llvm_link_shared: Cell<Option<bool>>,
        pub llvm_clang_cl: Option<String>,
        pub llvm_targets: Option<String>,
        pub llvm_experimental_targets: Option<String>,
        pub llvm_link_jobs: Option<u32>,
        pub llvm_version_suffix: Option<String>,
        pub llvm_use_linker: Option<String>,
        pub llvm_allow_old_toolchain: bool,
        pub llvm_polly: bool,
        pub llvm_clang: bool,
        pub llvm_enable_warnings: bool,
        pub llvm_from_ci: bool,
        pub llvm_build_config: HashMap<String, String>,
        pub bootstrap_override_lld: BootstrapOverrideLld,
        pub lld_enabled: bool,
        pub llvm_tools_enabled: bool,
        pub llvm_bitcode_linker_enabled: bool,
        pub llvm_cflags: Option<String>,
        pub llvm_cxxflags: Option<String>,
        pub llvm_ldflags: Option<String>,
        pub llvm_use_libcxx: bool,
        pub gcc_ci_mode: GccCiMode,
        pub rust_optimize: RustOptimize,
        pub rust_codegen_units: Option<u32>,
        pub rust_codegen_units_std: Option<u32>,
        pub rustc_debug_assertions: bool,
        pub std_debug_assertions: bool,
        pub tools_debug_assertions: bool,
        pub rust_overflow_checks: bool,
        pub rust_overflow_checks_std: bool,
        pub rust_debug_logging: bool,
        pub rust_debuginfo_level_rustc: DebuginfoLevel,
        pub rust_debuginfo_level_std: DebuginfoLevel,
        pub rust_debuginfo_level_tools: DebuginfoLevel,
        pub rust_debuginfo_level_tests: DebuginfoLevel,
        pub rust_rpath: bool,
        pub rust_strip: bool,
        pub rust_frame_pointers: bool,
        pub rust_stack_protector: Option<String>,
        pub rustc_default_linker: Option<String>,
        pub rust_optimize_tests: bool,
        pub rust_dist_src: bool,
        pub rust_codegen_backends: Vec<CodegenBackendKind>,
        pub rust_verify_llvm_ir: bool,
        pub rust_thin_lto_import_instr_limit: Option<u32>,
        pub rust_randomize_layout: bool,
        pub rust_remap_debuginfo: bool,
        pub rust_new_symbol_mangling: Option<bool>,
        pub rust_profile_use: Option<String>,
        pub rust_profile_generate: Option<String>,
        pub rust_lto: RustcLto,
        pub rust_validate_mir_opts: Option<u32>,
        pub rust_std_features: BTreeSet<String>,
        pub rust_break_on_ice: bool,
        pub rust_parallel_frontend_threads: Option<u32>,
        pub llvm_profile_use: Option<String>,
        pub llvm_profile_generate: bool,
        pub llvm_libunwind_default: Option<LlvmLibunwind>,
        pub enable_bolt_settings: bool,
        pub reproducible_artifacts: Vec<String>,
        pub host_target: TargetSelection,
        pub hosts: Vec<TargetSelection>,
        pub targets: Vec<TargetSelection>,
        pub local_rebuild: bool,
        pub jemalloc: bool,
        pub control_flow_guard: bool,
        pub ehcont_guard: bool,
        pub dist_sign_folder: Option<PathBuf>,
        pub dist_upload_addr: Option<String>,
        pub dist_compression_formats: Option<Vec<String>>,
        pub dist_compression_profile: String,
        pub dist_include_mingw_linker: bool,
        pub dist_vendor: bool,
        pub backtrace: bool,
        pub low_priority: bool,
        pub channel: String,
        pub description: Option<String>,
        pub verbose_tests: bool,
        pub save_toolstates: Option<PathBuf>,
        pub print_step_timings: bool,
        pub print_step_rusage: bool,
        pub musl_root: Option<PathBuf>,
        pub prefix: Option<PathBuf>,
        pub sysconfdir: Option<PathBuf>,
        pub datadir: Option<PathBuf>,
        pub docdir: Option<PathBuf>,
        pub bindir: PathBuf,
        pub libdir: Option<PathBuf>,
        pub mandir: Option<PathBuf>,
        pub codegen_tests: bool,
        pub nodejs: Option<PathBuf>,
        pub npm: Option<PathBuf>,
        pub gdb: Option<PathBuf>,
        pub lldb: Option<PathBuf>,
        pub python: Option<PathBuf>,
        pub windows_rc: Option<PathBuf>,
        pub reuse: Option<PathBuf>,
        pub cargo_native_static: bool,
        pub configure_args: Vec<String>,
        pub out: PathBuf,
        pub rust_info: GitInfo,
        pub cargo_info: GitInfo,
        pub rust_analyzer_info: GitInfo,
        pub clippy_info: GitInfo,
        pub miri_info: GitInfo,
        pub rustfmt_info: GitInfo,
        pub enzyme_info: GitInfo,
        pub in_tree_llvm_info: GitInfo,
        pub in_tree_gcc_info: GitInfo,
        pub initial_cargo: PathBuf,
        pub initial_rustc: PathBuf,
        pub initial_cargo_clippy: Option<PathBuf>,
        pub initial_sysroot: PathBuf,
        pub initial_rustfmt: Option<PathBuf>,
        pub paths: Vec<PathBuf>,
        pub compiletest_diff_tool: Option<String>,
        pub compiletest_allow_stage0: bool,
        pub tidy_extra_checks: Option<String>,
        pub is_running_on_ci: bool,
        pub path_modification_cache: Arc<Mutex<HashMap<Vec<&'static str>, PathFreshness>>>,
        pub skip_std_check_if_no_download_rustc: bool,
        pub exec_ctx: ExecutionContext,
    }

Expand description

Global configuration for the entire build and/or bootstrap.

This structure is parsed from `bootstrap.toml`, and some of the fields are inferred from `git` or build-time parameters.

Note that this structure is not decoded directly into, but rather it is filled out from the decoded forms of the structs below. For documentation on each field, see the corresponding fields in `bootstrap.example.toml`.

## Fields§

§`change_id: Option<ChangeId>`§`bypass_bootstrap_lock: bool`§`ccache: Option<String>`§`ninja_in_file: bool`

Call Build::ninja() instead of this.

§`submodules: Option<bool>`§`compiler_docs: bool`§`library_docs_private_items: bool`§`docs_minification: bool`§`docs: bool`§`locked_deps: bool`§`vendor: bool`§`target_config: HashMap<TargetSelection, Target>`§`full_bootstrap: bool`§`bootstrap_cache_path: Option<PathBuf>`§`extended: bool`§`tools: Option<HashSet<String>>`§`tool: HashMap<String, Tool>`

Specify build configuration specific for some tool, such as enabled features, see Tool. The key in the map is the name of the tool, and the value is tool-specific configuration.

§`sanitizers: bool`§`profiler: bool`§`omit_git_hash: bool`§`skip: Vec<PathBuf>`§`include_default_paths: bool`§`rustc_error_format: Option<String>`§`json_output: bool`§`compile_time_deps: bool`§`test_compare_mode: bool`§`color: Color`§`patch_binaries_for_nix: Option<bool>`§`stage0_metadata: Stage0`§`android_ndk: Option<PathBuf>`§`optimized_compiler_builtins: CompilerBuiltins`§`stdout_is_tty: bool`§`stderr_is_tty: bool`§`on_fail: Option<String>`§`explicit_stage_from_cli: bool`§`explicit_stage_from_config: bool`§`stage: u32`§`keep_stage: Vec<u32>`§`keep_stage_std: Vec<u32>`§`src: PathBuf`§`config: Option<PathBuf>`

defaults to `bootstrap.toml`

§`jobs: Option<u32>`§`cmd: Subcommand`§`incremental: bool`§`dump_bootstrap_shims: bool`§`free_args: Vec<String>`

Arguments appearing after `--` to be forwarded to tools, e.g. `--fix-broken` or test arguments.

§`download_rustc_commit: Option<String>`

`None` if we shouldn’t download CI compiler artifacts, or the commit to download if we should.

§`deny_warnings: bool`§`backtrace_on_ice: bool`§`llvm_assertions: bool`§`llvm_tests: bool`§`llvm_enzyme: bool`§`llvm_offload: bool`§`llvm_plugins: bool`§`llvm_optimize: bool`§`llvm_thin_lto: bool`§`llvm_release_debuginfo: bool`§`llvm_static_stdcpp: bool`§`llvm_libzstd: bool`§`llvm_link_shared: Cell<Option<bool>>`§`llvm_clang_cl: Option<String>`§`llvm_targets: Option<String>`§`llvm_experimental_targets: Option<String>`§`llvm_link_jobs: Option<u32>`§`llvm_version_suffix: Option<String>`§`llvm_use_linker: Option<String>`§`llvm_allow_old_toolchain: bool`§`llvm_polly: bool`§`llvm_clang: bool`§`llvm_enable_warnings: bool`§`llvm_from_ci: bool`§`llvm_build_config: HashMap<String, String>`§`bootstrap_override_lld: BootstrapOverrideLld`§`lld_enabled: bool`§`llvm_tools_enabled: bool`§`llvm_bitcode_linker_enabled: bool`§`llvm_cflags: Option<String>`§`llvm_cxxflags: Option<String>`§`llvm_ldflags: Option<String>`§`llvm_use_libcxx: bool`§`gcc_ci_mode: GccCiMode`§`rust_optimize: RustOptimize`§`rust_codegen_units: Option<u32>`§`rust_codegen_units_std: Option<u32>`§`rustc_debug_assertions: bool`§`std_debug_assertions: bool`§`tools_debug_assertions: bool`§`rust_overflow_checks: bool`§`rust_overflow_checks_std: bool`§`rust_debug_logging: bool`§`rust_debuginfo_level_rustc: DebuginfoLevel`§`rust_debuginfo_level_std: DebuginfoLevel`§`rust_debuginfo_level_tools: DebuginfoLevel`§`rust_debuginfo_level_tests: DebuginfoLevel`§`rust_rpath: bool`§`rust_strip: bool`§`rust_frame_pointers: bool`§`rust_stack_protector: Option<String>`§`rustc_default_linker: Option<String>`§`rust_optimize_tests: bool`§`rust_dist_src: bool`§`rust_codegen_backends: Vec<CodegenBackendKind>`§`rust_verify_llvm_ir: bool`§`rust_thin_lto_import_instr_limit: Option<u32>`§`rust_randomize_layout: bool`§`rust_remap_debuginfo: bool`§`rust_new_symbol_mangling: Option<bool>`§`rust_profile_use: Option<String>`§`rust_profile_generate: Option<String>`§`rust_lto: RustcLto`§`rust_validate_mir_opts: Option<u32>`§`rust_std_features: BTreeSet<String>`§`rust_break_on_ice: bool`§`rust_parallel_frontend_threads: Option<u32>`§`llvm_profile_use: Option<String>`§`llvm_profile_generate: bool`§`llvm_libunwind_default: Option<LlvmLibunwind>`§`enable_bolt_settings: bool`§`reproducible_artifacts: Vec<String>`§`host_target: TargetSelection`§`hosts: Vec<TargetSelection>`§`targets: Vec<TargetSelection>`§`local_rebuild: bool`§`jemalloc: bool`§`control_flow_guard: bool`§`ehcont_guard: bool`§`dist_sign_folder: Option<PathBuf>`§`dist_upload_addr: Option<String>`§`dist_compression_formats: Option<Vec<String>>`§`dist_compression_profile: String`§`dist_include_mingw_linker: bool`§`dist_vendor: bool`§`backtrace: bool`§`low_priority: bool`§`channel: String`§`description: Option<String>`§`verbose_tests: bool`§`save_toolstates: Option<PathBuf>`§`print_step_timings: bool`§`print_step_rusage: bool`§`musl_root: Option<PathBuf>`§`prefix: Option<PathBuf>`§`sysconfdir: Option<PathBuf>`§`datadir: Option<PathBuf>`§`docdir: Option<PathBuf>`§`bindir: PathBuf`§`libdir: Option<PathBuf>`§`mandir: Option<PathBuf>`§`codegen_tests: bool`§`nodejs: Option<PathBuf>`§`npm: Option<PathBuf>`§`gdb: Option<PathBuf>`§`lldb: Option<PathBuf>`§`python: Option<PathBuf>`§`windows_rc: Option<PathBuf>`§`reuse: Option<PathBuf>`§`cargo_native_static: bool`§`configure_args: Vec<String>`§`out: PathBuf`§`rust_info: GitInfo`§`cargo_info: GitInfo`§`rust_analyzer_info: GitInfo`§`clippy_info: GitInfo`§`miri_info: GitInfo`§`rustfmt_info: GitInfo`§`enzyme_info: GitInfo`§`in_tree_llvm_info: GitInfo`§`in_tree_gcc_info: GitInfo`§`initial_cargo: PathBuf`§`initial_rustc: PathBuf`§`initial_cargo_clippy: Option<PathBuf>`§`initial_sysroot: PathBuf`§`initial_rustfmt: Option<PathBuf>`§`paths: Vec<PathBuf>`

The paths to work with. For example: with `./x check foo bar` we get `paths=["foo", "bar"]`.

§`compiletest_diff_tool: Option<String>`

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

§`compiletest_allow_stage0: bool`

Whether to allow running both `compiletest` self-tests and `compiletest`-managed test suites against the stage 0 (rustc, std).

This is only intended to be used when the stage 0 compiler is actually built from in-tree sources.

§`tidy_extra_checks: Option<String>`

Default value for `--extra-checks`

§`is_running_on_ci: bool`§`path_modification_cache: Arc<Mutex<HashMap<Vec<&'static str>, PathFreshness>>>`

Cache for determining path modifications

§`skip_std_check_if_no_download_rustc: bool`

Skip checking the standard library if `rust.download-rustc` isn’t available. This is mostly for RA as building the stage1 compiler to check the library tree on each code change might be too much for some computers.

§`exec_ctx: ExecutionContext`

## Implementations§

Source§

### impl Config

Source

#### pub fn set_dry_run(&mut self, dry_run: DryRun)

Source

#### pub fn get_dry_run(&self) -> &DryRun

Source

#### pub fn parse(flags: Flags) -> Config

Source

#### pub(crate) fn parse_inner( flags: Flags, get_toml: impl Fn(&Path) -> Result<TomlConfig, Error>, ) -> Config

Source

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

Source

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

Source

#### pub(crate) fn test_args(&self) -> Vec<&str>

Source

#### pub(crate) fn args(&self) -> Vec<&str>

Source

#### pub(crate) fn read_file_by_commit(&self, file: &Path, commit: &str) -> String

Returns the content of the given file at a specific commit.

Source

#### pub(crate) fn artifact_version_part(&self, commit: &str) -> String

Bootstrap embeds a version number into the name of shared libraries it uploads in CI. Return the version it would have used for the given commit.

Source

#### pub fn bindir_relative(&self) -> &Path

Try to find the relative path of `bindir`, otherwise return it in full.

Source

#### pub fn libdir_relative(&self) -> Option<&Path>

Try to find the relative path of `libdir`.

Source

#### pub(crate) fn ci_llvm_root(&self) -> PathBuf

The absolute path to the downloaded LLVM artifacts.

Source

#### pub(crate) fn ci_rustc_dir(&self) -> PathBuf

Directory where the extracted `rustc-dev` component is stored.

Source

#### pub(crate) fn llvm_link_shared(&self) -> bool

Determine whether llvm should be linked dynamically.

If `false`, llvm should be linked statically. This is computed on demand since LLVM might have to first be downloaded from CI.

Source

#### pub(crate) fn download_rustc(&self) -> bool

Return whether we will use a downloaded, pre-compiled version of rustc, or just build from source.

Source

#### pub(crate) fn download_rustc_commit(&self) -> Option<&str>

Source

#### pub fn do_if_verbose(&self, f: impl Fn())

Runs a function if verbosity is greater than 0

Source

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

Source

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

Source

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

Returns whether or not submodules should be managed by bootstrap.

Source

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

Source

#### pub(crate) fn update_submodule(&self, relative_path: &str)

Given a path to the directory of a submodule, update it.

`relative_path` should be relative to the root of the git repository, not an absolute path.

This does not update the submodule if `bootstrap.toml` explicitly says not to, or if we’re not in a git repository (like a plain source tarball). Typically `crate::Build::require_submodule` should be used instead to provide a nice error to the user if the submodule is missing.

Source

#### pub fn has_changes_from_upstream(&self, paths: &[&'static str]) -> bool

Returns true if any of the `paths` have been modified locally.

Source

#### pub fn check_path_modifications(&self, paths: &[&'static str]) -> PathFreshness

Checks whether any of the given paths have been modified w.r.t. upstream.

Source

#### pub fn sanitizers_enabled(&self, target: TargetSelection) -> bool

Source

#### pub fn needs_sanitizer_runtime_built(&self, target: TargetSelection) -> bool

Source

#### pub fn profiler_path(&self, target: TargetSelection) -> Option<&str>

Source

#### pub fn profiler_enabled(&self, target: TargetSelection) -> bool

Source

#### pub fn enabled_codegen_backends( &self, target: TargetSelection, ) -> &[CodegenBackendKind]

Returns codegen backends that should be:

- Built and added to the sysroot when we build the compiler.
- Distributed when `x dist` is executed (if the codegen backend has a dist step).

Source

#### pub fn default_codegen_backend( &self, target: TargetSelection, ) -> &CodegenBackendKind

Returns the codegen backend that should be configured as the default codegen backend for a rustc compiled by bootstrap.

Source

#### pub fn jemalloc(&self, target: TargetSelection) -> bool

Source

#### pub fn rpath_enabled(&self, target: TargetSelection) -> bool

Source

#### pub fn optimized_compiler_builtins( &self, target: TargetSelection, ) -> &CompilerBuiltins

Source

#### pub fn llvm_enabled(&self, target: TargetSelection) -> bool

Source

#### pub fn llvm_libunwind(&self, target: TargetSelection) -> LlvmLibunwind

Source

#### pub fn split_debuginfo(&self, target: TargetSelection) -> SplitDebuginfo

Source

#### pub fn is_host_target(&self, target: TargetSelection) -> bool

Checks if the given target is the same as the host target.

Source

#### pub fn is_system_llvm(&self, target: TargetSelection) -> bool

Returns `true` if this is an external version of LLVM not managed by bootstrap. In particular, we expect llvm sources to be available when this is false.

NOTE: this is not the same as `!is_rust_llvm` when `llvm_has_patches` is set.

Source

#### pub fn is_rust_llvm(&self, target: TargetSelection) -> bool

Returns `true` if this is our custom, patched, version of LLVM.

This does not necessarily imply that we’re managing the `llvm-project` submodule.

Source

#### pub fn exec_ctx(&self) -> &ExecutionContext

Source

#### pub fn git_info(&self, omit_git_hash: bool, dir: &Path) -> GitInfo

Source§

### impl Config

Source

#### pub(crate) fn get_builder_toml( &self, build_name: &str, ) -> Result<TomlConfig, Error>

Source

#### pub(crate) fn get_toml(file: &Path) -> Result<TomlConfig, Error>

Source

#### pub(crate) fn get_toml_inner(file: &Path) -> Result<TomlConfig, Error>

Source§

### impl Config

Generic helpers that are useful anywhere in bootstrap.

Source

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

Source

#### pub(crate) fn create<P: AsRef<Path>>(&self, path: P, s: &str)

Source

#### pub(crate) fn remove(&self, f: &Path)

Source

#### pub(crate) fn tempdir(&self) -> PathBuf

Create a temporary directory in `out` and return its path.

NOTE: this temporary directory is shared between all steps; if you need an empty directory, create a new subdirectory inside it.

Source

#### fn should_fix_bins_and_dylibs(&self) -> bool

Whether or not `fix_bin_or_dylib` needs to be run; can only be true on NixOS

Source

#### fn fix_bin_or_dylib(&self, fname: &Path)

Modifies the interpreter section of ‘fname’ to fix the dynamic linker, or the RPATH section, to fix the dynamic library search path

This is only required on NixOS and uses the PatchELF utility to change the interpreter/RPATH of ELF executables.

Please see https://nixos.org/patchelf.html for more information

Source

#### fn download_file(&self, url: &str, dest_path: &Path, help_on_error: &str)

Source

#### fn unpack(&self, tarball: &Path, dst: &Path, pattern: &str)

Source§

### impl Config

Functions that are only ever called once, but named for clarity and to avoid thousand-line functions.

Source

#### pub(crate) fn download_clippy(&self) -> PathBuf

Source

#### pub(crate) fn ci_rust_std_contents(&self) -> Vec<String>

Source

#### pub(crate) fn ci_rustc_dev_contents(&self) -> Vec<String>

Source

#### fn ci_component_contents(&self, stamp_file: &str) -> Vec<String>

Source

#### pub(crate) fn download_ci_rustc(&self, commit: &str)

Source

#### fn download_toolchain( &self, version: &str, sysroot: &str, stamp_key: &str, extra_components: &[&str], download_component: fn(&Config, String, &str, &str), )

Source

#### fn download_ci_component( &self, filename: String, prefix: &str, commit_with_assertions: &str, )

Download a single component of a CI-built toolchain (not necessarily a published nightly).

Source

#### fn download_component( &self, mode: DownloadSource, filename: String, prefix: &str, key: &str, destination: &str, )

Source

#### pub(crate) fn maybe_download_ci_llvm(&self)

Source

#### fn download_ci_llvm(&self, llvm_sha: &str)

Source

#### pub fn download_ci_gcc(&self, gcc_sha: &str, root_dir: &Path)

## Trait Implementations§

Source§

### impl AsRef<ExecutionContext> for Config

Source§

#### fn as_ref(&self) -> &ExecutionContext

Converts this type into a shared reference of the (usually inferred) input type.
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 Default for Config

Source§

#### fn default() -> Config

Returns the “default value” for a type. Read more
Source§

### impl<'a> From<&'a Config> for DownloadContext<'a>

Source§

#### fn from(value: &'a Config) -> Self

Converts to this type from the input type.

## 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.

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.

§

### 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> Same for T

Source§

#### type Output = T

Should always be `Self`
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.

## 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: 3200 bytes