RegistryReader

Struct RegistryReader 

Source
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

Source

pub fn new(region: RegistryRegion) -> Self

Create a reader wrapping the given region.

Source

pub fn lookup(&self, name: &str) -> Result<Vec<ServiceRegistration>>

Look up all registrations for a service name.

Source

pub fn lookup_one(&self, name: &str) -> Result<Option<ServiceRegistration>>

Look up a single registration (first match).

Source

pub fn lookup_filtered( &self, name: &str, filter: &RegistryFilter, ) -> Result<Vec<ServiceRegistration>>

Look up registrations matching a filter.

Source

pub fn list_services(&self) -> Result<Vec<String>>

List all distinct service names.

Source

pub fn watch(&self) -> RegistryWatcher

Create a watcher anchored at the current version.

Source

pub fn version(&self) -> u64

Return the current registry version.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.