pub struct InstanceMetadata {
pub device_key: PrivateKey,
pub users_db: ID,
pub databases_db: ID,
pub sync_db: Option<ID>,
}Expand description
Persistent metadata for an Eidetica instance.
This struct consolidates all instance-level state that needs to persist across restarts:
- The device signing key (cryptographic identity)
- System database root IDs
- Optional sync database root ID
The presence of InstanceMetadata in a backend indicates an initialized instance.
A backend without metadata is treated as uninitialized and may trigger instance creation.
Fields§
§device_key: PrivateKeyDevice signing key - the instance’s cryptographic identity.
This key is generated once during instance creation and persists for the lifetime of the instance. It is used to sign system database entries and for sync identity.
users_db: IDRoot ID of the _users system database.
This database tracks user accounts and their associated data.
databases_db: IDRoot ID of the _databases system database.
This database tracks metadata about all databases in the instance.
sync_db: Option<ID>Root ID of the _sync database (None until enable_sync() is called).
This database stores all sync-related state.
Trait Implementations§
Source§impl Clone for InstanceMetadata
impl Clone for InstanceMetadata
Source§fn clone(&self) -> InstanceMetadata
fn clone(&self) -> InstanceMetadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InstanceMetadata
impl Debug for InstanceMetadata
Source§impl<'de> Deserialize<'de> for InstanceMetadata
impl<'de> Deserialize<'de> for InstanceMetadata
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for InstanceMetadata
impl RefUnwindSafe for InstanceMetadata
impl Send for InstanceMetadata
impl Sync for InstanceMetadata
impl Unpin for InstanceMetadata
impl UnwindSafe for InstanceMetadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>
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