pub struct AdvancedBindingBuilder<TInterface: ?Sized + 'static> { /* private fields */ }
Expand description
Advanced binding builder for fluent configuration
Implementations§
Source§impl<TInterface: ?Sized + 'static> AdvancedBindingBuilder<TInterface>
impl<TInterface: ?Sized + 'static> AdvancedBindingBuilder<TInterface>
pub fn new() -> Self
Sourcepub fn with_lifetime(self, lifetime: ServiceScope) -> Self
pub fn with_lifetime(self, lifetime: ServiceScope) -> Self
Set service lifetime
Sourcepub fn when_env(self, key: &'static str, value: impl Into<String>) -> Self
pub fn when_env(self, key: &'static str, value: impl Into<String>) -> Self
Add environment condition
Sourcepub fn when_feature(self, feature: impl Into<String>) -> Self
pub fn when_feature(self, feature: impl Into<String>) -> Self
Add feature flag condition
Sourcepub fn when_not_feature(self, feature: impl Into<String>) -> Self
pub fn when_not_feature(self, feature: impl Into<String>) -> Self
Add inverse feature flag condition
Sourcepub fn as_default(self) -> Self
pub fn as_default(self) -> Self
Mark as default implementation
Sourcepub fn in_profile(self, profile: impl Into<String>) -> Self
pub fn in_profile(self, profile: impl Into<String>) -> Self
Add profile condition
Sourcepub fn config(self) -> BindingConfig
pub fn config(self) -> BindingConfig
Get the configuration
Trait Implementations§
Auto Trait Implementations§
impl<TInterface> Freeze for AdvancedBindingBuilder<TInterface>where
TInterface: ?Sized,
impl<TInterface> !RefUnwindSafe for AdvancedBindingBuilder<TInterface>
impl<TInterface> !Send for AdvancedBindingBuilder<TInterface>
impl<TInterface> !Sync for AdvancedBindingBuilder<TInterface>
impl<TInterface> Unpin for AdvancedBindingBuilder<TInterface>where
TInterface: ?Sized,
impl<TInterface> !UnwindSafe for AdvancedBindingBuilder<TInterface>
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