pub struct BaseProvider { /* private fields */ }
Expand description
Base provider implementation for common functionality
Implementations§
Source§impl BaseProvider
impl BaseProvider
Sourcepub fn with_version(self, version: &'static str) -> Self
pub fn with_version(self, version: &'static str) -> Self
Set provider version
Sourcepub fn with_description(self, description: &'static str) -> Self
pub fn with_description(self, description: &'static str) -> Self
Set provider description
Sourcepub fn with_dependencies(self, dependencies: Vec<&'static str>) -> Self
pub fn with_dependencies(self, dependencies: Vec<&'static str>) -> Self
Set provider dependencies
Sourcepub fn with_defer_boot(self, defer_boot: bool) -> Self
pub fn with_defer_boot(self, defer_boot: bool) -> Self
Set defer boot flag
Sourcepub fn with_optional(self, is_optional: bool) -> Self
pub fn with_optional(self, is_optional: bool) -> Self
Set if provider is optional
Trait Implementations§
Source§impl Debug for BaseProvider
impl Debug for BaseProvider
Source§impl ServiceProvider for BaseProvider
impl ServiceProvider for BaseProvider
Source§fn register(
&self,
builder: ContainerBuilder,
) -> Result<ContainerBuilder, ProviderError>
fn register( &self, builder: ContainerBuilder, ) -> Result<ContainerBuilder, ProviderError>
Register services in the container builder
This is called during the registration phase
Source§fn dependencies(&self) -> Vec<&'static str>
fn dependencies(&self) -> Vec<&'static str>
Provider dependencies (other providers that must be registered first)
Source§fn defer_boot(&self) -> bool
fn defer_boot(&self) -> bool
Defer boot phase (useful for providers that need other providers to be booted first)
Source§fn description(&self) -> Option<&'static str>
fn description(&self) -> Option<&'static str>
Provider description
Source§fn is_optional(&self) -> bool
fn is_optional(&self) -> bool
Check if this provider is optional
Auto Trait Implementations§
impl Freeze for BaseProvider
impl RefUnwindSafe for BaseProvider
impl Send for BaseProvider
impl Sync for BaseProvider
impl Unpin for BaseProvider
impl UnwindSafe for BaseProvider
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