pub struct Database { /* private fields */ }Expand description
The authoritative event store and projection boundary for one local identity.
Built-in reducers and projection tables are not part of the external API:
let _ = rostra_client_db::Database::process_event_content_inserted_tx;let _ = rostra_client_db::events_singletons_new::TABLE;let _ = rostra_client_db::Database::write_with::<()>;let _ = rostra_client_db::Database::write_with_inner::<()>;let _ = rostra_client_db::Database::read_with::<()>;let _: Option<rostra_client_db::WriteTransactionCtx> = None;rostra_client_db::def_table!(forbidden: u64 => u64);Implementations§
Source§impl Database
impl Database
Sourcepub async fn is_event_content_missing(&self, event_id: ShortEventId) -> bool
pub async fn is_event_content_missing(&self, event_id: ShortEventId) -> bool
Check if an event’s content is in the missing state.
Sourcepub async fn peek_next_missing_content(&self) -> Option<NextMissingContent>
pub async fn peek_next_missing_content(&self) -> Option<NextMissingContent>
Peek at the next missing content entry (earliest scheduled fetch).
Transactionally removes inconsistent entries from the front of
events_content_missing, then returns the first entry whose timestamp
matches the event’s current Missing state. Returns None if no valid
entry remains.
Sourcepub async fn record_failed_content_fetch(
&self,
event_id: ShortEventId,
old_scheduled_time: Timestamp,
attempted_at: Timestamp,
next_attempt_at: Timestamp,
)
pub async fn record_failed_content_fetch( &self, event_id: ShortEventId, old_scheduled_time: Timestamp, attempted_at: Timestamp, next_attempt_at: Timestamp, )
Record a failed content fetch attempt.
Updates the events_content_missing schedule entry and the
events_content_state metadata for the given event.
The caller provides both the factual time of the attempt
(attempted_at) and the scheduling decision (next_attempt_at).
The backoff calculation lives in the fetcher, not in the DB layer.
The update is compare-and-set against old_scheduled_time. If another
completion or a terminal content transition already changed the current
state, this stale completion has no effect. The replacement schedule
must be strictly later than the observed schedule so a schedule value
cannot be reused as an ABA-prone compare-and-set token.
Sourcepub async fn paginate_missing_events_contents(
&self,
cursor: Option<(Timestamp, ShortEventId)>,
limit: usize,
) -> (Vec<(RostraId, ShortEventId)>, Option<(Timestamp, ShortEventId)>)
pub async fn paginate_missing_events_contents( &self, cursor: Option<(Timestamp, ShortEventId)>, limit: usize, ) -> (Vec<(RostraId, ShortEventId)>, Option<(Timestamp, ShortEventId)>)
Paginate through missing content entries.
Returns events sorted by their next scheduled fetch time. Inconsistent rows are omitted; fetcher peeking performs their transactional removal.
Source§impl Database
impl Database
pub async fn recalculate_news_post_score( &self, post_id: ExternalEventId, ) -> bool
pub async fn get_random_news_post_ids( &self, limit: usize, ) -> Vec<ExternalEventId>
Return a voter’s current projected vote for one full post identity.
The outer None means this post is not the winner for its shortened
singleton key. The inner None is a retained neutral vote. This query
reads the inline current projection and does not require retained source
payload bytes.
§Panics
Panics on storage failure or a vote singleton with a missing or invalid inline projection.
Sourcepub async fn paginate_news_posts_by_rank_rev(
&self,
cursor: Option<NewsRankPaginationCursor>,
limit: usize,
) -> (Vec<NewsPostRecord<SocialPost>>, Option<NewsRankPaginationCursor>)
pub async fn paginate_news_posts_by_rank_rev( &self, cursor: Option<NewsRankPaginationCursor>, limit: usize, ) -> (Vec<NewsPostRecord<SocialPost>>, Option<NewsRankPaginationCursor>)
Paginate news posts by rank score, newest cursor positions moving from highest score toward lower scores.
Sourcepub async fn paginate_news_posts_by_time_rev(
&self,
cursor: Option<NewsTimePaginationCursor>,
limit: usize,
) -> (Vec<NewsPostRecord<SocialPost>>, Option<NewsTimePaginationCursor>)
pub async fn paginate_news_posts_by_time_rev( &self, cursor: Option<NewsTimePaginationCursor>, limit: usize, ) -> (Vec<NewsPostRecord<SocialPost>>, Option<NewsTimePaginationCursor>)
Paginate news posts by capped creation timestamp, newest first.
Source§impl Database
impl Database
pub fn paginate_table<K, V, R>( table: &impl ReadableTable<K, V>, cursor: Option<K>, limit: usize, filter_fn: impl Fn(K, V) -> Result<Option<R>, DbError> + Send + 'static, ) -> Result<(Vec<R>, Option<K>), DbError>
pub fn paginate_table_rev<K, V, R>( table: &impl ReadableTable<K, V>, cursor: Option<K>, limit: usize, filter_fn: impl Fn(K, V) -> Result<Option<R>, DbError> + Send + 'static, ) -> Result<(Vec<R>, Option<K>), DbError>
pub fn paginate_table_partition<K, V, C, R>( table: &impl ReadableTable<K, V>, prefix: RangeInclusive<K>, cursor_to_key: impl Fn(C) -> K, cursor: Option<C>, limit: usize, filter_fn: impl Fn(K, V) -> Result<Option<R>, DbError> + Send + 'static, ) -> Result<(Vec<R>, Option<K>), DbError>
pub fn paginate_table_partition_rev<K, V, C, R>( table: &impl ReadableTable<K, V>, prefix: RangeInclusive<K>, cursor_to_key: impl Fn(C) -> K, cursor: Option<C>, limit: usize, filter_fn: impl Fn(K, V) -> Result<Option<R>, DbError> + Send + 'static, ) -> Result<(Vec<R>, Option<K>), DbError>
Source§impl Database
impl Database
Sourcepub async fn get_self_followees_snapshot(
&self,
) -> Result<Vec<SelfFollowee>, DbError>
pub async fn get_self_followees_snapshot( &self, ) -> Result<Vec<SelfFollowee>, DbError>
Gets all active direct self-follows from one current-state read snapshot.
An unfollow removes the relationship from this snapshot. A later
refollow creates a new uninterrupted epoch whose first_ts excludes
follows at or before the winning unfollow boundary. Additional
follows in the current epoch can move first_ts earlier, while the
effective persona selector continues to come from the winning follow
event.
Concurrent commits fall wholly before or after the read snapshot; the returned records never combine relationships from different database states. The order of returned records is unspecified.
§Errors
Returns an error on storage or record decode failure.
Source§impl Database
impl Database
Get the cursor of the most recently received social post.
Used for tracking “last seen” notification position.
Paginate social posts ordered by when we received them (forward).
Used for notification badge count calculation.
Paginate social posts ordered by when we received them (reverse).
Used for notification timeline display.
pub async fn get_posts_by_id( &self, post_ids: impl Iterator<Item = ShortEventId>, ) -> HashMap<ShortEventId, SocialPostRecord<SocialPost>>
Get all persona tags used by an identity, with usage counts > 0.
pub async fn get_personas_for_id( &self, id: RostraId, ) -> BTreeMap<PersonaId, String>
pub async fn get_personas( &self, iter: impl Iterator<Item = (RostraId, PersonaId)>, ) -> BTreeMap<(RostraId, PersonaId), String>
Sourcepub async fn is_self_mention(&self, event_id: ShortEventId) -> bool
pub async fn is_self_mention(&self, event_id: ShortEventId) -> bool
Check if a post is a self-mention (mentions the local user).
Returns true if the post with the given event_id is recorded in
the social_posts_self_mention table, meaning it contains an @mention
of the local user.
Sourcepub async fn get_self_mentions(&self) -> HashSet<ShortEventId>
pub async fn get_self_mentions(&self) -> HashSet<ShortEventId>
Get the set of all event IDs that are self-mentions.
Returns a HashSet of ShortEventIds for posts that mention the local user. Used for efficient filtering in notification queries.
Sourcepub async fn get_latest_shoutbox_received_at_cursor(
&self,
) -> Option<ReceivedAtPaginationCursor>
pub async fn get_latest_shoutbox_received_at_cursor( &self, ) -> Option<ReceivedAtPaginationCursor>
Get the cursor of the most recently received shoutbox post.
Used for tracking “last seen” shoutbox position.
Sourcepub async fn paginate_shoutbox_posts_by_received_at_rev(
&self,
cursor: Option<ReceivedAtPaginationCursor>,
limit: usize,
) -> (Vec<ShoutboxPostRecord>, Option<ReceivedAtPaginationCursor>)
pub async fn paginate_shoutbox_posts_by_received_at_rev( &self, cursor: Option<ReceivedAtPaginationCursor>, limit: usize, ) -> (Vec<ShoutboxPostRecord>, Option<ReceivedAtPaginationCursor>)
Paginate shoutbox posts ordered by when we received them (reverse - newest first).
Unlike social posts, shoutbox posts are not filtered - all posts are shown.
Sourcepub async fn count_shoutbox_posts_since(
&self,
cursor: Option<ReceivedAtPaginationCursor>,
limit: usize,
) -> usize
pub async fn count_shoutbox_posts_since( &self, cursor: Option<ReceivedAtPaginationCursor>, limit: usize, ) -> usize
Count shoutbox posts received after the given cursor.
Used for counting unread shoutbox messages.
Source§impl Database
impl Database
Gets a cursor at the current tip of the SocialPost materialization feed.
The cursor denotes the next sequence in one read snapshot. Establishing that snapshot is the consumer-enablement linearization point: every occurrence visible before the tip is acknowledged by the cursor, while an occurrence committed after the snapshot has a sequence at or after the cursor and remains discoverable by a later scan. A commit concurrent with this call may fall on either side of that boundary.
This reads only the feed’s last key; it does not enumerate or resolve feed rows. An empty feed returns the sequence-zero cursor.
§Errors
Returns an error on storage, key decode, or sequence overflow.
Scans ordinary SocialPost materializations in commit order.
after is an opaque position acknowledging every earlier occurrence.
None starts at this database lineage’s cutover position zero. The
schema upgrade does not backfill posts materialized by older code.
Each logged identity is resolved against one current-state read
snapshot. Later deletion, pruning, or replacement yields
SocialPostMaterialization::Removed; a currently available post
yields SocialPostMaterialization::Present. Log rows remain
append-only either way. limit bounds rows resolved, and the
implementation performs at most one additional key lookahead to
determine snapshot-relative exhaustion.
A replaced post is still required to have a coherent lifecycle. If that
lifecycle claims the content remains processed, retained bytes must be
present and decodable. Corruption takes precedence over Removed.
§Errors
Returns no page or acknowledgment on storage, decode, cursor, density, or current-state invariant errors.
Source§impl Database
impl Database
Sourcepub const EVENT_METADATA_SIZE: u64 = 192
pub const EVENT_METADATA_SIZE: u64 = 192
Size of event metadata in bytes (Event struct + signature). See rostra_core::event::Event documentation.
Source§impl Database
impl Database
pub async fn mk_db_path( data_dir: &Path, self_id: RostraId, ) -> Result<PathBuf, Error>
pub async fn new_in_memory(self_id: RostraId) -> Result<Database, DbError>
Sourcepub async fn open(
path: impl Into<PathBuf>,
self_id: RostraId,
) -> Result<Database, DbError>
pub async fn open( path: impl Into<PathBuf>, self_id: RostraId, ) -> Result<Database, DbError>
Open an identity database, creating it when absent.
Opening storage older than schema version 25 performs the total rebuild
before returning. This can hold a long atomic write transaction and
requires deployment-specific RAM and temporary disk headroom. See
specs/ARCH-client-database.md#total-rebuild.
pub async fn compact(&mut self) -> Result<bool, CompactionError>
pub async fn dump_table(&self, name: &str) -> Result<(), TableDumpError>
Sourcepub fn self_followees_subscribe(
&self,
) -> CurrentState<Arc<HashMap<RostraId, IdsFolloweesRecord>>>
pub fn self_followees_subscribe( &self, ) -> CurrentState<Arc<HashMap<RostraId, IdsFolloweesRecord>>>
Subscribe to owned snapshots of the retained current self-followee projection.
Sourcepub fn self_followers_subscribe(
&self,
) -> CurrentState<Arc<HashMap<RostraId, IdsFollowersRecord>>>
pub fn self_followers_subscribe( &self, ) -> CurrentState<Arc<HashMap<RostraId, IdsFollowersRecord>>>
Subscribe to owned snapshots of the retained current self-follower projection.
Sourcepub fn self_wot_subscribe(&self) -> CurrentState<Arc<WotData>>
pub fn self_wot_subscribe(&self) -> CurrentState<Arc<WotData>>
Subscribe to owned snapshots of the retained current Web-of-Trust projection.
Sourcepub fn self_head_subscribe(&self) -> CurrentState<Option<ShortEventId>>
pub fn self_head_subscribe(&self) -> CurrentState<Option<ShortEventId>>
Subscribe to owned snapshots of the retained deterministic self-head representative.
The value is the minimum current ShortEventId. It is a stable default,
not a claim that the current head set is a singleton. Every committed
self-event insertion publishes, even when the representative is
unchanged.
pub fn new_content_subscribe(&self) -> Receiver<VerifiedEventContent>
pub fn new_posts_subscribe( &self, ) -> Receiver<(VerifiedEventContent, SocialPost)>
pub fn new_shoutbox_subscribe( &self, ) -> Receiver<(VerifiedEventContent, Shoutbox)>
Sourcepub fn new_heads_subscribe(&self) -> Receiver<(RostraId, ShortEventId)>
pub fn new_heads_subscribe(&self) -> Receiver<(RostraId, ShortEventId)>
Subscribe to incremental exact new-head signals.
This lossy channel carries the event that became a head. Consumers that lag must recover from the durable complete head set.
pub fn ids_with_missing_events_subscribe( &self, capacity: usize, ) -> Receiver<RostraId>
pub fn news_score_updates_subscribe( &self, capacity: usize, ) -> Receiver<ExternalEventId>
Sourcepub fn content_missing_notify(&self) -> Arc<Notify> ⓘ
pub fn content_missing_notify(&self) -> Arc<Notify> ⓘ
Get a handle to the content-missing notification.
The MissingEventContentFetcher calls notified() on this to wake up
when new missing content is inserted into the database.
pub async fn has_event(&self, event_id: impl Into<ShortEventId>) -> bool
pub async fn get_missing_events_for_id(&self, id: RostraId) -> Vec<ShortEventId>
Sourcepub async fn get_ids_with_missing_events(
&self,
after: Option<RostraId>,
limit: usize,
) -> Vec<RostraId>
pub async fn get_ids_with_missing_events( &self, after: Option<RostraId>, limit: usize, ) -> Vec<RostraId>
Lists unique authors that still have missing event envelopes.
The page starts strictly after after, is ordered by author ID, and
contains at most limit authors. A zero limit returns an empty page.
Each call uses an independent read transaction. Callers that reconcile
multiple pages should capture Self::get_last_id_with_missing_events
first and stop at that high-water author.
This compatibility query panics if the database read fails.
Sourcepub async fn get_last_id_with_missing_events(&self) -> Option<RostraId>
pub async fn get_last_id_with_missing_events(&self) -> Option<RostraId>
Returns the greatest author ID that currently has missing event envelopes.
This compatibility query panics if the database read fails.
pub async fn get_heads_events_for_id(&self, id: RostraId) -> Vec<ShortEventId>
Sourcepub async fn get_ids_with_heads(
&self,
after: Option<RostraId>,
limit: usize,
) -> Vec<RostraId>
pub async fn get_ids_with_heads( &self, after: Option<RostraId>, limit: usize, ) -> Vec<RostraId>
Lists a bounded ordered page of unique authors with current durable heads.
The page starts strictly after after. A zero limit returns an empty
page. This compatibility query panics if the database read fails.
pub async fn count_missing_events_for_id(&self, id: RostraId) -> usize
pub async fn count_heads_events_for_id(&self, id: RostraId) -> usize
pub async fn get_data_usage(&self, id: RostraId) -> IdsDataUsageRecord
pub async fn get_self_followees(&self) -> Vec<(RostraId, PersonasTagsSelector)>
pub async fn get_followees( &self, id: RostraId, ) -> Vec<(RostraId, PersonasTagsSelector)>
pub async fn get_followees_extended( &self, id: RostraId, ) -> (HashMap<RostraId, PersonasTagsSelector>, HashSet<RostraId>)
pub async fn get_self_followers(&self) -> Vec<RostraId>
pub async fn get_followers(&self, id: RostraId) -> Vec<RostraId>
pub async fn get_event( &self, event_id: impl Into<ShortEventId>, ) -> Option<EventRecord>
pub async fn get_event_content( &self, event_id: impl Into<ShortEventId>, ) -> Option<EventContentRaw>
Sourcepub async fn get_event_content_state(
&self,
event_id: impl Into<ShortEventId>,
) -> Option<EventContentState>
pub async fn get_event_content_state( &self, event_id: impl Into<ShortEventId>, ) -> Option<EventContentState>
Return the lifecycle state for event content that is not currently stored.
For an existing event, None normally means the content was processed.
A terminal state such as Deleted, Pruned, or Invalid means callers
must not wait for payload availability.
Sourcepub async fn get_self_current_head(&self) -> Option<ShortEventId>
pub async fn get_self_current_head(&self) -> Option<ShortEventId>
Return the minimum current self-head as a deterministic representative.
Use Self::get_heads_self when the complete set is required.
pub async fn get_self_random_eventid(&self) -> Option<ShortEventId>
Sourcepub async fn try_process_event(
&self,
event: &VerifiedEvent,
) -> Result<(InsertEventOutcome, ProcessEventState), DbError>
pub async fn try_process_event( &self, event: &VerifiedEvent, ) -> Result<(InsertEventOutcome, ProcessEventState), DbError>
Fallibly process a verified event envelope.
§Errors
Returns storage and transaction errors, including
DbError::IdentityPrefixCollision. An error leaves the ingestion
transaction uncommitted.
Sourcepub async fn process_event(
&self,
event: &VerifiedEvent,
) -> (InsertEventOutcome, ProcessEventState)
pub async fn process_event( &self, event: &VerifiedEvent, ) -> (InsertEventOutcome, ProcessEventState)
Process a verified event envelope, panicking on storage failure.
§Panics
Panics after rolling back if storage fails or the event author’s shortened identity prefix is already mapped to a different full identity.
Sourcepub async fn try_process_event_with_content(
&self,
content: &VerifiedEventContent,
) -> Result<(InsertEventOutcome, ProcessEventState), DbError>
pub async fn try_process_event_with_content( &self, content: &VerifiedEventContent, ) -> Result<(InsertEventOutcome, ProcessEventState), DbError>
Fallibly process a verified envelope and its verified content atomically.
This operation is idempotent whether or not the envelope or content was processed previously.
§Errors
Returns storage and transaction errors, including
DbError::IdentityPrefixCollision. An error rolls back the envelope,
content, lifecycle, and projection changes together.
Sourcepub async fn process_event_with_content(
&self,
content: &VerifiedEventContent,
) -> (InsertEventOutcome, ProcessEventState)
pub async fn process_event_with_content( &self, content: &VerifiedEventContent, ) -> (InsertEventOutcome, ProcessEventState)
Process a verified envelope and its verified content, panicking on storage failure.
This operation is idempotent whether or not the envelope or content was processed previously.
§Panics
Panics after rolling back if storage fails or a stored invariant is violated, including a vote winner with a missing or invalid inline projection or a shortened identity prefix mapped to a different full identity.
Sourcepub async fn try_process_event_content(
&self,
event_content: &VerifiedEventContent,
) -> Result<(), DbError>
pub async fn try_process_event_content( &self, event_content: &VerifiedEventContent, ) -> Result<(), DbError>
Fallibly process verified content and its carried envelope atomically.
This is the safe public content-ingestion boundary. If the envelope is absent, it is inserted before content processing in the same transaction. If the envelope is already present, normal lifecycle-state checks make the operation idempotent and prevent repeated accounting or projections.
§Errors
Returns errors under the same conditions as
Database::try_process_event_with_content.
Sourcepub async fn process_event_content(&self, event_content: &VerifiedEventContent)
pub async fn process_event_content(&self, event_content: &VerifiedEventContent)
Process verified content and its carried envelope, panicking on storage failure.
§Panics
Panics under the same conditions as
Database::process_event_with_content.
pub async fn wants_content( &self, event_id: impl Into<ShortEventId>, process_state: ProcessEventState, ) -> bool
pub fn db_init_time(&self) -> Timestamp
pub fn iroh_secret(&self) -> SecretKey
Source§impl Database
impl Database
Sourcepub async fn extension_write<T>(
&self,
f: impl FnOnce(&ExtensionWriteTransaction<'_>) -> Result<T, DbError>,
) -> Result<T, DbError>
pub async fn extension_write<T>( &self, f: impl FnOnce(&ExtensionWriteTransaction<'_>) -> Result<T, DbError>, ) -> Result<T, DbError>
Runs a serialized transaction over caller-owned extension tables.
The closure cannot access built-in graph, lifecycle, or projection tables. It must not re-enter database writes. This trusted persistence boundary does not include extension data in core replay or convergence; callers own their schema, invariants, and compatibility. Total database migrations preserve extension tables byte-for-byte.
Returning Ok commits all extension-table mutations atomically.
Returning Err, panicking, or failing a reserved-name/table
operation leaves the transaction uncommitted. Post-commit built-in
projection hooks are not available at this boundary.
§Errors
Returns the closure’s error and propagates transaction, table, and
commit errors. Opening a reserved table returns
DbError::ReservedExtensionTable.
Sourcepub async fn extension_read<T>(
&self,
f: impl FnOnce(&ExtensionReadTransaction<'_>) -> Result<T, DbError>,
) -> Result<T, DbError>
pub async fn extension_read<T>( &self, f: impl FnOnce(&ExtensionReadTransaction<'_>) -> Result<T, DbError>, ) -> Result<T, DbError>
Runs a read transaction over trusted, caller-owned extension tables.
Callers own extension schemas, invariants, and compatibility; core event replay does not validate or rebuild their contents.
§Errors
Returns the closure’s error and propagates transaction and table errors.
Opening a reserved table returns DbError::ReservedExtensionTable.
Sourcepub async fn get_head(&self, id: RostraId) -> Option<ShortEventId>
pub async fn get_head(&self, id: RostraId) -> Option<ShortEventId>
Return the minimum current head as a deterministic representative.
Use Self::get_heads when the complete set is required.
Sourcepub async fn get_heads(&self, id: RostraId) -> HashSet<ShortEventId>
pub async fn get_heads(&self, id: RostraId) -> HashSet<ShortEventId>
Return the complete current head set for an identity.
Sourcepub async fn get_heads_self(&self) -> HashSet<ShortEventId>
pub async fn get_heads_self(&self) -> HashSet<ShortEventId>
Return the complete current head set for the local identity.
pub async fn get_latest_singleton_event( &self, rostra_id: RostraId, kind: EventKind, aux_key: EventAuxKey, ) -> Option<ShortEventId>
Sourcepub async fn get_latest_singleton_events(
&self,
rostra_id: RostraId,
kind: EventKind,
) -> Vec<ShortEventId>
pub async fn get_latest_singleton_events( &self, rostra_id: RostraId, kind: EventKind, ) -> Vec<ShortEventId>
Returns an identity’s singleton winners for one event kind in descending
(timestamp, ShortEventId) order.
pub async fn get_id_endpoints( &self, id: RostraId, ) -> BTreeMap<(Timestamp, IrohNodeId), IrohNodeRecord>
Sourcepub async fn insert_id_node(
&self,
id: RostraId,
node_id: IrohNodeId,
ts: Timestamp,
)
pub async fn insert_id_node( &self, id: RostraId, node_id: IrohNodeId, ts: Timestamp, )
Register an iroh node endpoint for an identity.
Useful for test setups where peer node addresses need to be manually registered.
Sourcepub async fn get_events_for_id(
&self,
id: RostraId,
limit: usize,
) -> Vec<(EventRecord, Timestamp, Option<EventContentState>)>
pub async fn get_events_for_id( &self, id: RostraId, limit: usize, ) -> Vec<(EventRecord, Timestamp, Option<EventContentState>)>
Get events for an identity, sorted by timestamp (most recent first).
Returns a vector of (EventRecord, Timestamp, EventContentState option) limited to the specified count.
Sourcepub async fn get_known_identities(&self) -> Vec<RostraId>
pub async fn get_known_identities(&self) -> Vec<RostraId>
Get all identities that have authored retained events.
Sourcepub async fn get_known_identity(
&self,
short_id: ShortRostraId,
) -> Option<RostraId>
pub async fn get_known_identity( &self, short_id: ShortRostraId, ) -> Option<RostraId>
Resolve a shortened identity that has authored a retained event.
Event ingestion rejects identity-prefix collisions, so a returned identity is unambiguous.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Database
impl !RefUnwindSafe for Database
impl !UnwindSafe for Database
impl Send for Database
impl Sync for Database
impl Unpin for Database
impl UnsafeUnpin for Database
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<F, T> ExpectFrom<F> for T
impl<F, T> ExpectFrom<F> for T
fn expect_from(other: F) -> T
Source§impl<F, I> ExpectInto<I> for Fwhere
I: ExpectFrom<F>,
impl<F, I> ExpectInto<I> for Fwhere
I: ExpectFrom<F>,
fn expect_into(self) -> I
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