pub struct ResourceRegistry { /* private fields */ }Expand description
Registry for resource types.
The registry maps type URLs to resource metadata and provides utilities for working with different resource types.
Implementations§
Source§impl ResourceRegistry
impl ResourceRegistry
Sourcepub fn with_envoy_types() -> Self
pub fn with_envoy_types() -> Self
Create a registry pre-populated with standard Envoy types.
Sourcepub fn register(&mut self, info: ResourceTypeInfo)
pub fn register(&mut self, info: ResourceTypeInfo)
Register a new resource type.
Sourcepub fn get(&self, type_url: &str) -> Option<&ResourceTypeInfo>
pub fn get(&self, type_url: &str) -> Option<&ResourceTypeInfo>
Get information about a resource type by type URL.
Sourcepub fn iter(&self) -> impl Iterator<Item = (&String, &ResourceTypeInfo)>
pub fn iter(&self) -> impl Iterator<Item = (&String, &ResourceTypeInfo)>
Iterate over all registered types.
Trait Implementations§
Source§impl Debug for ResourceRegistry
impl Debug for ResourceRegistry
Source§impl Default for ResourceRegistry
impl Default for ResourceRegistry
Source§fn default() -> ResourceRegistry
fn default() -> ResourceRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ResourceRegistry
impl RefUnwindSafe for ResourceRegistry
impl Send for ResourceRegistry
impl Sync for ResourceRegistry
impl Unpin for ResourceRegistry
impl UnsafeUnpin for ResourceRegistry
impl UnwindSafe for ResourceRegistry
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request