Skip to main content

BurnConfig

Struct BurnConfig 

Source
pub struct BurnConfig {
    pub fusion: FusionConfig,
    pub autodiff: AutodiffConfig,
}
Expand description

Represents the global configuration for Burn.

Fields§

§fusion: FusionConfig

Configuration for operation fusion.

§autodiff: AutodiffConfig

Configuration for autodiff.

Trait Implementations§

Source§

impl Clone for BurnConfig

Source§

fn clone(&self) -> BurnConfig

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 BurnConfig

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for BurnConfig

Source§

fn default() -> BurnConfig

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

impl<'de> Deserialize<'de> for BurnConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl RuntimeConfig for BurnConfig

Source§

fn storage() -> &'static Mutex<Option<Arc<Self>>>

Global storage for the configuration singleton. Read more
Source§

fn file_names() -> &'static [&'static str]

File names searched in each directory during [Config::from_current_dir]. Read more
Source§

fn section_file_names() -> &'static [(&'static str, &'static str)]

File names searched in each directory, where only a specific TOML section is loaded instead of the whole file. Read more
Source§

fn override_from_env(self) -> Self

Available on std_io only.
Hook to override fields from environment variables after loading from disk. Read more
Source§

fn get() -> Arc<Self>

Retrieves the current configuration, loading it from the current directory if not set. Read more
Source§

fn set(config: Self)

Sets the configuration to the provided value. Read more
Source§

fn save_default<P>(path: P) -> Result<(), Error>
where P: AsRef<Path>,

Available on std_io only.
Save the default configuration to the provided file path.
Source§

fn from_current_dir() -> Self

Available on std_io only.
Loads configuration from any of [Config::file_names] in the current directory or its parents. Read more
Source§

fn from_file_path<P>(path: P) -> Result<Self, Error>
where P: AsRef<Path>,

Available on std_io only.
Loads configuration from a specified file path.
Source§

fn from_section_file_path<P>(path: P, section: &str) -> Result<Self, Error>
where P: AsRef<Path>,

Available on std_io only.
Loads configuration from a specific TOML section of the file at the given path.
Source§

impl Serialize for BurnConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

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.

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.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,