pub struct BundledAppRegistry {
pub rules_hash: Box<str>,
pub app_count: usize,
/* private fields */
}Expand description
The doc formats the bundle declares, keyed by content type.
Fields§
§rules_hash: Box<str>Stable hash over the (content_type, search) pairs only — the staleness
stamp cloudillo_search::reindex folds into search.index_rev so a bundle
whose index rules changed triggers exactly one reindex per tenant. See
[rules_hash].
app_count: usizeManifests that contributed at least one format. Logged at startup.
Implementations§
Source§impl BundledAppRegistry
impl BundledAppRegistry
Sourcepub fn load<F>(dist_dir: &Path, validate_search: F) -> Self
pub fn load<F>(dist_dir: &Path, validate_search: F) -> Self
Read every manifest under dist_dir. Never fails: see the module docs.
validate_search checks one search block and returns why it is bad. It
is a callback rather than a direct call because the rules DSL lives in
cloudillo-search, which depends on this crate — validating here would be
a dependency cycle. A block it rejects costs that one content type its
entry, nothing else.
pub fn get(&self, content_type: &str) -> Option<&DocFormat>
pub fn iter(&self) -> impl Iterator<Item = &DocFormat>
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
Trait Implementations§
Source§impl Debug for BundledAppRegistry
impl Debug for BundledAppRegistry
Source§impl Default for BundledAppRegistry
impl Default for BundledAppRegistry
Source§fn default() -> BundledAppRegistry
fn default() -> BundledAppRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BundledAppRegistry
impl RefUnwindSafe for BundledAppRegistry
impl Send for BundledAppRegistry
impl Sync for BundledAppRegistry
impl Unpin for BundledAppRegistry
impl UnsafeUnpin for BundledAppRegistry
impl UnwindSafe for BundledAppRegistry
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
Converts
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> ⓘ
Converts
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().