pub struct ComposedRegistry<'a> { /* private fields */ }Expand description
Two TypeRegistry references layered for lookup, produced by
TypeRegistry::or.
Lookups consult the primary registry first and fall back to the
fallback registry, so an entry in primary shadows an entry with the
same key in fallback. Both registries are borrowed, so a ComposedRegistry
is a cheap, allocation-free view — typically a per-operation error registry
layered over the service-wide one for operation-scoped error resolution.
Implementations§
Source§impl ComposedRegistry<'_>
impl ComposedRegistry<'_>
Sourcepub fn entry_for(&self, id: &ShapeId<'_>) -> Option<&RegistryEntry>
pub fn entry_for(&self, id: &ShapeId<'_>) -> Option<&RegistryEntry>
Look up an entry by ShapeId, consulting primary then fallback.
Sourcepub fn entry_for_fqn(&self, fqn: &str) -> Option<&RegistryEntry>
pub fn entry_for_fqn(&self, fqn: &str) -> Option<&RegistryEntry>
Look up an entry by fully qualified name, consulting primary then
fallback.
Sourcepub fn entry_for_error_code(&self, wire_code: &str) -> Option<&RegistryEntry>
pub fn entry_for_error_code(&self, wire_code: &str) -> Option<&RegistryEntry>
Look up an entry by wire error code, consulting primary then
fallback. See TypeRegistry::entry_for_error_code.
This is the operation-scoped error resolution primitive: with an
operation’s error registry as primary and the service-wide registry
as fallback, an error the operation models is resolved against the
operation’s own set before the lookup widens to the rest of the service.
Trait Implementations§
Source§impl<'a> Clone for ComposedRegistry<'a>
impl<'a> Clone for ComposedRegistry<'a>
Source§fn clone(&self) -> ComposedRegistry<'a>
fn clone(&self) -> ComposedRegistry<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a> Debug for ComposedRegistry<'a>
impl<'a> Debug for ComposedRegistry<'a>
impl<'a> Copy for ComposedRegistry<'a>
Auto Trait Implementations§
impl<'a> Freeze for ComposedRegistry<'a>
impl<'a> !RefUnwindSafe for ComposedRegistry<'a>
impl<'a> Send for ComposedRegistry<'a>
impl<'a> Sync for ComposedRegistry<'a>
impl<'a> Unpin for ComposedRegistry<'a>
impl<'a> UnsafeUnpin for ComposedRegistry<'a>
impl<'a> !UnwindSafe for ComposedRegistry<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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