pub struct Registry { /* private fields */ }Expand description
A registry that wraps a DocStore and provides specialized methods for managing typed entries with metadata.
Registry provides a clean abstraction for storing entries with
{ type, config } structure. Used for:
_indexsubtree: Store type metadata in databasestransportssubtree: Transport configuration in sync
Implementations§
Source§impl Registry
impl Registry
Sourcepub async fn set_entry(
&self,
name: impl AsRef<str>,
type_id: impl Into<String>,
config: Doc,
) -> Result<()>
pub async fn set_entry( &self, name: impl AsRef<str>, type_id: impl Into<String>, config: Doc, ) -> Result<()>
Sourcepub async fn get_subtree_settings(
&self,
name: impl AsRef<str>,
) -> Result<SubtreeSettings>
pub async fn get_subtree_settings( &self, name: impl AsRef<str>, ) -> Result<SubtreeSettings>
Sourcepub async fn set_subtree_settings(
&self,
name: impl AsRef<str>,
settings: SubtreeSettings,
) -> Result<()>
pub async fn set_subtree_settings( &self, name: impl AsRef<str>, settings: SubtreeSettings, ) -> Result<()>
Update the settings for a registered subtree.
The subtree must already be registered (via set_entry). This method
only updates the settings portion, preserving the type_id and config.
§Arguments
name- The name of the subtreesettings- The new settings to apply
§Returns
Result indicating success or failure. Returns an error if the subtree is not registered.
Auto Trait Implementations§
impl Freeze for Registry
impl !RefUnwindSafe for Registry
impl Send for Registry
impl Sync for Registry
impl Unpin for Registry
impl !UnwindSafe for Registry
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more