pub struct FoxyLoader { /* private fields */ }
Expand description
Builder for initializing and configuring Foxy.
Implementations§
Source§impl FoxyLoader
impl FoxyLoader
Sourcepub fn with_config(self, config: Config) -> Self
pub fn with_config(self, config: Config) -> Self
Set a custom configuration to use.
Sourcepub fn with_config_file(self, file_path: &str) -> Self
pub fn with_config_file(self, file_path: &str) -> Self
Set a configuration file to load.
Sourcepub fn with_env_vars(self) -> Self
pub fn with_env_vars(self) -> Self
Enable environment variable configuration.
Sourcepub fn with_env_prefix(self, prefix: &str) -> Self
pub fn with_env_prefix(self, prefix: &str) -> Self
Set a custom prefix for environment variables (default is “FOXY_”).
Sourcepub fn with_provider<P: ConfigProvider + 'static>(self, provider: P) -> Self
pub fn with_provider<P: ConfigProvider + 'static>(self, provider: P) -> Self
Add a custom configuration provider.
Sourcepub fn with_filter<F: Filter + 'static>(self, filter: F) -> Self
pub fn with_filter<F: Filter + 'static>(self, filter: F) -> Self
Add a custom filter.
Sourcepub async fn build(self) -> Result<Foxy, LoaderError>
pub async fn build(self) -> Result<Foxy, LoaderError>
Build and initialize Foxy.
Trait Implementations§
Source§impl Debug for FoxyLoader
impl Debug for FoxyLoader
Source§impl Default for FoxyLoader
impl Default for FoxyLoader
Source§fn default() -> FoxyLoader
fn default() -> FoxyLoader
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FoxyLoader
impl !RefUnwindSafe for FoxyLoader
impl Send for FoxyLoader
impl Sync for FoxyLoader
impl Unpin for FoxyLoader
impl !UnwindSafe for FoxyLoader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more