pub struct RegistryReader { /* private fields */ }Expand description
Read handle for the service registry.
Provides lookup, filtering, listing, and watch operations. The reader
operates on a RegistryRegion which may be backed by the same leased
memory as the writer (in the fabric model) or a separate region (in tests).
Implementations§
Source§impl RegistryReader
impl RegistryReader
Sourcepub fn new(region: RegistryRegion) -> Self
pub fn new(region: RegistryRegion) -> Self
Create a reader wrapping the given region.
Sourcepub fn lookup(&self, name: &str) -> Result<Vec<ServiceRegistration>>
pub fn lookup(&self, name: &str) -> Result<Vec<ServiceRegistration>>
Look up all registrations for a service name.
Sourcepub fn lookup_one(&self, name: &str) -> Result<Option<ServiceRegistration>>
pub fn lookup_one(&self, name: &str) -> Result<Option<ServiceRegistration>>
Look up a single registration (first match).
Sourcepub fn lookup_filtered(
&self,
name: &str,
filter: &RegistryFilter,
) -> Result<Vec<ServiceRegistration>>
pub fn lookup_filtered( &self, name: &str, filter: &RegistryFilter, ) -> Result<Vec<ServiceRegistration>>
Look up registrations matching a filter.
Sourcepub fn list_services(&self) -> Result<Vec<String>>
pub fn list_services(&self) -> Result<Vec<String>>
List all distinct service names.
Sourcepub fn watch(&self) -> RegistryWatcher
pub fn watch(&self) -> RegistryWatcher
Create a watcher anchored at the current version.
Auto Trait Implementations§
impl Freeze for RegistryReader
impl !RefUnwindSafe for RegistryReader
impl !Send for RegistryReader
impl !Sync for RegistryReader
impl Unpin for RegistryReader
impl !UnwindSafe for RegistryReader
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