pub struct ProviderRegistry { /* private fields */ }Implementations§
Source§impl ProviderRegistry
impl ProviderRegistry
pub fn new() -> Self
pub fn register(&mut self, provider: Box<dyn UnderstandingProvider>)
pub fn providers(&self) -> &[Box<dyn UnderstandingProvider>]
Sourcepub fn select(
&self,
object: &ObjectDescriptor,
proto: &ProtoData,
) -> Option<(&dyn UnderstandingProvider, Support)>
pub fn select( &self, object: &ObjectDescriptor, proto: &ProtoData, ) -> Option<(&dyn UnderstandingProvider, Support)>
Select the provider with the highest support level (registration order breaks ties).
pub fn coverage_summary(&self) -> Vec<(String, String)>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ProviderRegistry
impl !UnwindSafe for ProviderRegistry
impl Freeze for ProviderRegistry
impl Send for ProviderRegistry
impl Sync for ProviderRegistry
impl Unpin for ProviderRegistry
impl UnsafeUnpin for ProviderRegistry
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more