pub struct SliceSet { /* private fields */ }Expand description
A set of registry slices, indexed by producer/service base name.
Implementations§
Source§impl SliceSet
impl SliceSet
Sourcepub fn from_dirs(dirs: &[PathBuf]) -> Result<SliceSet>
pub fn from_dirs(dirs: &[PathBuf]) -> Result<SliceSet>
Load from local registry/*.toml dirs — the offline source. What a
checked-out application declares. (types.toml is the type table,
not a slice — skipped.)
Sourcepub async fn from_bus(
session: &Session,
base: &str,
timeout: Duration,
) -> Result<SliceSet>
pub async fn from_bus( session: &Session, base: &str, timeout: Duration, ) -> Result<SliceSet>
Discover every live producer’s served slice from the bus
(crate::query::fleet_registry).
pub fn slices(&self) -> &[RegistrySlice]
pub fn get(&self, name: &str) -> Option<&RegistrySlice>
Sourcepub fn by_service_origin(&self, origin: &str) -> Option<&RegistrySlice>
pub fn by_service_origin(&self, origin: &str) -> Option<&RegistrySlice>
The slice declaring a service origin (@catalog) — service keys have
no producer chunk, so refinement resolves through this.
Sourcepub fn refine<'s>(
&'s self,
producer: &str,
class: &str,
tail: &[&str],
) -> Option<(&'s SubjectDecl, Vec<(String, String)>)>
pub fn refine<'s>( &'s self, producer: &str, class: &str, tail: &[&str], ) -> Option<(&'s SubjectDecl, Vec<(String, String)>)>
Refine a subject tail against one producer’s slice: the matching subject declaration plus its named variable bindings.
Sourcepub fn from_slices(slices: Vec<RegistrySlice>) -> SliceSet
pub fn from_slices(slices: Vec<RegistrySlice>) -> SliceSet
Build from already-parsed slices (no raw TOML retained — such a set
is skipped by write_cache).
Sourcepub fn write_cache(&self, dir: &Path) -> Result<()>
pub fn write_cache(&self, dir: &Path) -> Result<()>
Write the raw slice TOMLs to a cache dir (one file per producer). Repeated invocations and dynamic shell completion read this instead of round-tripping the bus.
Sourcepub fn read_cache(dir: &Path) -> SliceSet
pub fn read_cache(dir: &Path) -> SliceSet
Read a previously written cache dir. Same forgiving posture as
from_dirs, but a missing dir is an empty set, not an error.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SliceSet
impl RefUnwindSafe for SliceSet
impl Send for SliceSet
impl Sync for SliceSet
impl Unpin for SliceSet
impl UnsafeUnpin for SliceSet
impl UnwindSafe for SliceSet
Blanket Implementations§
Source§impl<Source> AccessAs for Source
impl<Source> AccessAs for Source
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> 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