pub struct Database { /* private fields */ }Implementations§
Source§impl Database
impl Database
pub async fn export_data(&self, exported_at: String) -> Result<AvenExport>
pub async fn validate_import_data(&self, export: &AvenExport) -> Result<()>
pub async fn import_data(&self, export: &AvenExport) -> Result<IntegrityReport>
pub async fn database_integrity_report(&self) -> Result<IntegrityReport>
pub async fn attachment_integrity_checks( &self, blob_dir: &Path, deep: bool, ) -> Result<Vec<IntegrityCheck>>
pub async fn create_backup_archive( &self, blob_dir: &Path, output: &Path, ) -> Result<()>
Source§impl Database
impl Database
pub fn latest_schema_version() -> Option<i64>
Sourcepub async fn inspect(path: &Path) -> InspectedDatabase
pub async fn inspect(path: &Path) -> InspectedDatabase
Copies an existing SQLite file and its sidecars into isolated temporary storage, then opens the isolated snapshot for diagnostic queries.
This path does not create parent directories, databases, sidecars, metadata, workspaces, journal settings, or migrations in user state.
Source§impl Database
impl Database
pub async fn open(path: &Path) -> Result<Self>
pub fn path(&self) -> &Path
Sourcepub async fn close(&self)
pub async fn close(&self)
Closes every connection, including those held by clones, and waits until SQLite has released the files. Dropping a database closes its connections in the background instead, so delete or replace the files only after this returns.
pub async fn meta(&self, key: &str) -> Result<Option<String>>
pub async fn conflict_exists( &self, workspace_id: &WorkspaceId, task_id: &TaskId, field: &str, ) -> Result<bool>
Source§impl Database
impl Database
pub async fn label_usage( &self, workspace_id: &WorkspaceId, ) -> Result<Vec<LabelUsage>>
pub async fn list_labels( &self, workspace_id: &WorkspaceId, search: Option<&str>, ) -> Result<Vec<String>>
pub async fn resolve_labels( &self, workspace_id: &WorkspaceId, labels: &[String], ) -> Result<Vec<String>>
Source§impl Database
impl Database
pub async fn daemon_sync_state(&self) -> Result<DaemonSyncState>
Sourcepub async fn record_daemon_sync_round(
&self,
at: i64,
error: Option<(&str, &str, i64)>,
) -> Result<()>
pub async fn record_daemon_sync_round( &self, at: i64, error: Option<(&str, &str, i64)>, ) -> Result<()>
Records an actual round, not idle polling or lock contention. Repeated errors retain their first-seen time; unchanged snapshots cause no write.
Sourcepub async fn sync_access_refusal(&self) -> Result<Option<SyncAccessRefusal>>
pub async fn sync_access_refusal(&self) -> Result<Option<SyncAccessRefusal>>
Returns the last time this installation’s sync credentials were refused.
Sourcepub async fn record_sync_access_refusal(&self) -> Result<SyncAccessRefusal>
pub async fn record_sync_access_refusal(&self) -> Result<SyncAccessRefusal>
Remembers an authentication refusal until a later sync succeeds.
Sourcepub async fn clear_sync_access_refusal(&self) -> Result<()>
pub async fn clear_sync_access_refusal(&self) -> Result<()>
Clears a previous authentication refusal after a successful sync.
Sourcepub async fn sync_vault_deletion(&self) -> Result<Option<SyncVaultDeletion>>
pub async fn sync_vault_deletion(&self) -> Result<Option<SyncVaultDeletion>>
Returns when the server last reported this sync’s vault deleted.
Sourcepub async fn record_sync_vault_deletion(&self) -> Result<SyncVaultDeletion>
pub async fn record_sync_vault_deletion(&self) -> Result<SyncVaultDeletion>
Remembers a vault deletion until a user-started sync succeeds or sync is reset.
pub async fn clear_sync_vault_deletion(&self) -> Result<()>
pub async fn restore_queue_workspace(&self) -> Result<Workspace>
pub async fn select_queue_workspace( &self, workspace_id: &WorkspaceId, ) -> Result<Workspace>
pub async fn onboarding_status(&self) -> Result<OnboardingStatus>
pub async fn complete_onboarding(&self) -> Result<()>
Source§impl Database
impl Database
pub async fn reminder_log(&self) -> Result<Vec<ReminderLogEntry>>
Sourcepub async fn record_reminders(&self, entries: &[ReminderLogEntry]) -> Result<()>
pub async fn record_reminders(&self, entries: &[ReminderLogEntry]) -> Result<()>
Records entries in one transaction, replacing the outcome of existing keys.
Source§impl Database
impl Database
pub async fn triage_reviews(&self) -> Result<TriageReviews>
Source§impl Database
impl Database
pub async fn list_metadata_fields( &self, workspace_id: &WorkspaceId, ) -> Result<Vec<MetadataFieldUsage>>
pub async fn find_metadata_field( &self, workspace_id: &WorkspaceId, key: &str, ) -> Result<Option<MetadataField>>
pub async fn rename_metadata_field( &self, workspace: &Workspace, key: &str, new_key: &str, ) -> Result<MetadataField>
Source§impl Database
impl Database
pub async fn task_metadata( &self, workspace_id: &WorkspaceId, task_id: &TaskId, ) -> Result<Vec<TaskMetadataValue>>
Source§impl Database
impl Database
pub async fn set_task_status( &self, workspace: &Workspace, task: &Task, status: &str, ) -> Result<Task>
pub async fn set_task_priority( &self, workspace: &Workspace, task: &Task, priority: &str, ) -> Result<Task>
pub async fn cycle_task_priority( &self, workspace: &Workspace, task: &Task, reverse: bool, ) -> Result<Task>
pub async fn set_task_deleted_state( &self, workspace: &Workspace, task: &Task, deleted: bool, ) -> Result<Task>
pub async fn set_task_field( &self, workspace: &Workspace, task_id: &TaskId, field: &str, value: &str, ) -> Result<bool>
pub async fn set_task_project( &self, workspace: &Workspace, task_id: &TaskId, project: &Project, ) -> Result<bool>
pub async fn set_task_fields( &self, workspace: &Workspace, updates: &[(TaskId, String, String)], ) -> Result<Vec<bool>>
pub async fn cycle_task_priorities( &self, workspace: &Workspace, tasks: &[Task], reverse: bool, ) -> Result<Vec<Task>>
Source§impl Database
impl Database
pub async fn add_task_attachment( &self, workspace: &Workspace, blob_dir: &Path, policy: LifecyclePolicy, task_id: &TaskId, input: AttachmentAddInput, ) -> Result<AttachmentAddOutcome>
pub async fn add_ordered_task_attachment( &self, workspace: &Workspace, blob_dir: &Path, policy: LifecyclePolicy, task_id: &TaskId, created_at: String, input: TaskAttachmentAddInput, ) -> Result<AttachmentAddOutcome>
pub async fn attachment_by_id( &self, workspace: &Workspace, attachment_id: &str, ) -> Result<AttachmentOutcome>
pub async fn delete_task_attachment( &self, workspace: &Workspace, attachment_id: &str, ) -> Result<AttachmentOutcome>
Sourcepub async fn attachment_read_items_by_task(
&self,
blob_dir: &Path,
workspace_id: &WorkspaceId,
task_id: &TaskId,
include_deleted: bool,
) -> Result<Vec<AttachmentReadItem>>
pub async fn attachment_read_items_by_task( &self, blob_dir: &Path, workspace_id: &WorkspaceId, task_id: &TaskId, include_deleted: bool, ) -> Result<Vec<AttachmentReadItem>>
Reports inventory availability, downgraded to unavailable when the
object file is absent from blob_dir.
pub async fn prune_attachments( &self, blob_dir: &Path, policy: LifecyclePolicy, apply: bool, ) -> Result<PruneSummary>
pub async fn acquire_attachment_lease( &self, sha256: &str, purpose: &str, ) -> Result<String>
pub async fn acquire_live_attachment_read_lease( &self, workspace: &Workspace, attachment_id: &str, ) -> Result<AttachmentReadLease>
pub async fn release_attachment_lease(&self, lease_id: &str) -> Result<()>
pub async fn attachment_lifecycle_report( &self, blob_dir: &Path, policy: LifecyclePolicy, ) -> Result<LifecycleReport>
Source§impl Database
impl Database
pub async fn list_conflicts( &self, workspace: &Workspace, project_key: Option<&str>, field: Option<&str>, ) -> Result<Vec<ConflictListItem>>
pub async fn task_conflicts( &self, workspace: &Workspace, task_id: &TaskId, field: Option<&str>, ) -> Result<Vec<ConflictDetail>>
pub async fn unresolved_task_conflict_fields( &self, workspace_id: &WorkspaceId, candidates: &[(TaskId, String)], ) -> Result<HashMap<TaskId, HashSet<String>>>
pub async fn conflict_variant_value( &self, workspace: &Workspace, task_id: &TaskId, field: &str, token: &str, ) -> Result<String>
pub async fn resolve_conflict_with_tui_undo( &self, workspace: &Workspace, task_id: &TaskId, field: &str, value: &str, ) -> Result<ConflictResolutionOutcome>
pub async fn resolve_conflict( &self, workspace: &Workspace, task_id: &TaskId, field: &str, value: &str, ) -> Result<ConflictOutcome>
pub async fn recurrence_series_conflicts( &self, workspace: &Workspace, series_id: &RecurrenceSeriesId, field: Option<&str>, ) -> Result<Vec<ConflictDetail>>
pub async fn recurrence_conflict_variant_value( &self, workspace: &Workspace, series_id: &RecurrenceSeriesId, field: &str, token: &str, ) -> Result<String>
pub async fn resolve_recurrence_conflict( &self, workspace: &Workspace, series_id: &RecurrenceSeriesId, field: &str, value: &str, ) -> Result<String>
Source§impl Database
impl Database
pub async fn add_task_dependency( &self, workspace: &Workspace, task_id: &TaskId, depends_on_id: &TaskId, ) -> Result<DependencyOutcome>
pub async fn add_task_dependency_with_undo( &self, workspace: &Workspace, task_id: &TaskId, depends_on_id: &TaskId, undo: UndoContext, ) -> Result<DependencyOutcome>
pub async fn remove_task_dependency( &self, workspace: &Workspace, task_id: &TaskId, depends_on_id: &TaskId, ) -> Result<DependencyOutcome>
pub async fn remove_task_dependency_with_undo( &self, workspace: &Workspace, task_id: &TaskId, depends_on_id: &TaskId, undo: UndoContext, ) -> Result<DependencyOutcome>
Source§impl Database
impl Database
pub async fn add_task_to_epic( &self, workspace: &Workspace, child_id: &TaskId, epic_id: &TaskId, ) -> Result<EpicLinkOutcome>
pub async fn add_task_to_epic_with_undo( &self, workspace: &Workspace, child_id: &TaskId, epic_id: &TaskId, undo: UndoContext, ) -> Result<EpicLinkOutcome>
pub async fn remove_task_from_epic( &self, workspace: &Workspace, child_id: &TaskId, epic_id: &TaskId, ) -> Result<EpicLinkOutcome>
pub async fn remove_task_from_epic_with_undo( &self, workspace: &Workspace, child_id: &TaskId, epic_id: &TaskId, undo: UndoContext, ) -> Result<EpicLinkOutcome>
Source§impl Database
impl Database
pub async fn create_label( &self, workspace: &Workspace, name: &str, ) -> Result<LabelOutcome>
pub async fn create_label_with_tui_undo( &self, workspace: &Workspace, name: &str, ) -> Result<LabelOutcome>
pub async fn delete_label( &self, workspace: &Workspace, name: &str, ) -> Result<LabelDeleteOutcome>
pub async fn delete_label_with_tui_undo( &self, workspace: &Workspace, name: &str, ) -> Result<LabelDeleteOutcome>
pub async fn rename_label_with_tui_undo( &self, workspace: &Workspace, name: &str, new_name: &str, ) -> Result<LabelRenameOutcome>
Source§impl Database
impl Database
pub async fn create_project( &self, workspace: &Workspace, name: &str, ) -> Result<ProjectOutcome>
pub async fn create_project_with_tui_undo( &self, workspace: &Workspace, name: &str, ) -> Result<ProjectOutcome>
pub async fn delete_project( &self, workspace: &Workspace, project: &str, ) -> Result<ProjectDeleteOutcome>
pub async fn rename_project( &self, workspace: &Workspace, project: &str, new_name: &str, prefix: Option<&str>, ) -> Result<ProjectRenameOutcome>
pub async fn rename_project_with_tui_undo( &self, workspace: &Workspace, project: &str, new_name: &str, prefix: Option<&str>, ) -> Result<ProjectRenameOutcome>
pub async fn rename_project_before_commit<T, F>( &self, workspace: &Workspace, project: &str, new_name: &str, prefix: Option<&str>, before_commit: F, ) -> Result<(ProjectRenameOutcome, T)>
Source§impl Database
impl Database
pub async fn create_recurrence_series( &self, workspace: &Workspace, params: CreateRecurrenceSeriesParams, ) -> Result<RecurrenceCreateOutcome>
pub async fn update_recurrence_template( &self, workspace: &Workspace, series_id: &RecurrenceSeriesId, params: UpdateRecurrenceTemplateParams, ) -> Result<RecurrenceTemplateUpdateOutcome>
pub async fn reconcile_recurrence_series( &self, workspace: &Workspace, series_id: &RecurrenceSeriesId, at: DateTime<Utc>, ) -> Result<RecurrenceReconcileOutcome>
pub async fn resolve_recurrence_occurrence( &self, workspace: &Workspace, task_id: &TaskId, outcome: RecurrenceOutcome, ) -> Result<RecurrenceResolveOutcome>
pub async fn resolve_recurrence_occurrence_with_undo( &self, workspace: &Workspace, task_id: &TaskId, outcome: RecurrenceOutcome, undo: UndoContext, ) -> Result<RecurrenceResolveOutcome>
pub async fn pause_recurrence_series( &self, workspace: &Workspace, series_id: &RecurrenceSeriesId, ) -> Result<RecurrenceStateOutcome>
pub async fn resume_recurrence_series( &self, workspace: &Workspace, series_id: &RecurrenceSeriesId, at: DateTime<Utc>, ) -> Result<RecurrenceStateOutcome>
pub async fn stop_recurrence_series( &self, workspace: &Workspace, series_id: &RecurrenceSeriesId, skip_current: bool, ) -> Result<RecurrenceStateOutcome>
pub async fn resolve_recurrence_ref( &self, workspace: &Workspace, input: &str, ) -> Result<RecurrenceSeries>
pub async fn recurrence_series_ref( &self, workspace_id: &WorkspaceId, series_id: &RecurrenceSeriesId, ) -> Result<String>
Source§impl Database
impl Database
pub async fn move_tasks( &self, source_workspace: &Workspace, input: MoveTasksInput, ) -> Result<MoveTasksOutcome>
Source§impl Database
impl Database
pub async fn create_task_with_attachments( &self, workspace: &Workspace, blob_dir: &Path, lifecycle_policy: LifecyclePolicy, draft: TaskDraft, attachments: Vec<TaskAttachmentAddInput>, ) -> Result<TaskOutcome>
pub async fn create_task_with_attachments_and_undo( &self, workspace: &Workspace, blob_dir: &Path, lifecycle_policy: LifecyclePolicy, draft: TaskDraft, attachments: Vec<TaskAttachmentAddInput>, undo: TaskCreationUndo, ) -> Result<TaskOutcome>
pub async fn create_task_with_attachments_and_options( &self, workspace: &Workspace, blob_dir: &Path, lifecycle_policy: LifecyclePolicy, draft: TaskDraft, attachments: Vec<TaskAttachmentAddInput>, options: TaskCreationOptions, ) -> Result<TaskOutcome>
pub async fn create_task_with_attachments_for_epic( &self, workspace: &Workspace, blob_dir: &Path, lifecycle_policy: LifecyclePolicy, draft: TaskDraft, attachments: Vec<TaskAttachmentAddInput>, epic_id: &TaskId, ) -> Result<TaskOutcome>
pub async fn create_task_with_attachments_for_epic_and_undo( &self, workspace: &Workspace, blob_dir: &Path, lifecycle_policy: LifecyclePolicy, draft: TaskDraft, attachments: Vec<TaskAttachmentAddInput>, options: TaskCreationOptions, ) -> Result<TaskOutcome>
Source§impl Database
impl Database
pub async fn create_task( &self, workspace: &Workspace, draft: TaskDraft, ) -> Result<TaskOutcome>
pub async fn create_task_with_undo( &self, workspace: &Workspace, draft: TaskDraft, undo: TaskCreationUndo, ) -> Result<TaskOutcome>
pub async fn create_task_with_options( &self, workspace: &Workspace, draft: TaskDraft, options: TaskCreationOptions, ) -> Result<TaskOutcome>
pub async fn create_task_for_epic( &self, workspace: &Workspace, draft: TaskDraft, epic_id: &TaskId, ) -> Result<TaskOutcome>
pub async fn create_task_for_epic_with_undo( &self, workspace: &Workspace, draft: TaskDraft, epic_id: &TaskId, undo: TaskCreationUndo, ) -> Result<TaskOutcome>
Source§impl Database
impl Database
pub async fn update_task( &self, workspace: &Workspace, task_id: &TaskId, update: TaskUpdate, ) -> Result<TaskUpdateOutcome>
pub async fn update_tasks( &self, workspace: &Workspace, updates: Vec<(TaskId, TaskUpdate)>, ) -> Result<Vec<TaskUpdateOutcome>>
pub async fn mutate_tasks( &self, workspace: &Workspace, updates: Vec<(TaskId, TaskUpdate)>, undo: UndoContext, ) -> Result<TaskMutationReport>
pub async fn set_task_deleted( &self, workspace: &Workspace, task_id: &TaskId, deleted: bool, ) -> Result<TaskOutcome>
Source§impl Database
impl Database
pub async fn add_note( &self, workspace: &Workspace, task_id: &TaskId, body: String, ) -> Result<NoteOutcome>
pub async fn add_note_with_tui_undo( &self, workspace: &Workspace, task_id: &TaskId, body: String, ) -> Result<NoteOutcome>
pub async fn edit_note( &self, workspace: &Workspace, task_id: &TaskId, note_id: &str, body: String, ) -> Result<NoteEditOutcome>
pub async fn edit_note_with_tui_undo( &self, workspace: &Workspace, task_id: &TaskId, note_id: &str, body: String, ) -> Result<NoteEditOutcome>
pub async fn delete_note( &self, workspace: &Workspace, task_id: &TaskId, note_id: &str, ) -> Result<NoteDeleteOutcome>
pub async fn delete_note_with_tui_undo( &self, workspace: &Workspace, task_id: &TaskId, note_id: &str, ) -> Result<NoteDeleteOutcome>
Source§impl Database
impl Database
pub async fn find_project( &self, workspace_id: &WorkspaceId, input: &str, ) -> Result<Option<Project>>
pub async fn find_project_by_id( &self, workspace_id: &WorkspaceId, project_id: &ProjectId, ) -> Result<Option<Project>>
pub async fn resolve_existing_project( &self, workspace_id: &WorkspaceId, project: &str, ) -> Result<Project>
pub async fn list_projects( &self, workspace_id: &WorkspaceId, search: Option<&str>, ) -> Result<Vec<Project>>
pub async fn inferred_project_key_for_add( &self, workspace_id: &WorkspaceId, config_candidate: Option<&str>, cwd: &Path, git_root: Option<&Path>, ) -> Result<Option<String>>
pub async fn inferred_existing_project_key( &self, workspace_id: &WorkspaceId, config_candidate: Option<&str>, cwd: &Path, git_root: Option<&Path>, ) -> Result<Option<String>>
pub async fn remove_project_path( &self, workspace_id: &WorkspaceId, project_id: &ProjectId, path: &Path, ) -> Result<()>
pub async fn resolve_or_create_project( &self, workspace_id: &WorkspaceId, project: &str, ) -> Result<Project>
pub async fn resolve_project_for_stored_value( &self, workspace_id: &WorkspaceId, value: &str, ) -> Result<Project>
Source§impl Database
impl Database
Sourcepub async fn reconcile_recurrence_reports_at(
&self,
workspace_id: &WorkspaceId,
at: DateTime<Utc>,
) -> Result<RecurrenceReconciliation>
pub async fn reconcile_recurrence_reports_at( &self, workspace_id: &WorkspaceId, at: DateTime<Utc>, ) -> Result<RecurrenceReconciliation>
Reconciles recurrence projections before a report reads current state.
The candidate count is bounded. Each changed series writes one atomic projection transaction that can archive one superseded task and materialize one successor.
pub async fn reconcile_recurrence_reports( &self, workspace_id: &WorkspaceId, ) -> Result<RecurrenceReconciliation>
pub async fn list_recurrence_series_view_at( &self, workspace_id: &WorkspaceId, at: DateTime<Utc>, query: RecurrenceSeriesListQuery, ) -> Result<Vec<RecurrenceSeriesListItem>>
pub async fn list_recurrence_series_view( &self, workspace_id: &WorkspaceId, query: RecurrenceSeriesListQuery, ) -> Result<Vec<RecurrenceSeriesListItem>>
pub async fn list_recurrence_series_at( &self, workspace_id: &WorkspaceId, at: DateTime<Utc>, ) -> Result<Vec<RecurrenceSeriesSummary>>
pub async fn recurrence_series_detail_at( &self, workspace_id: &WorkspaceId, series_id: &RecurrenceSeriesId, at: DateTime<Utc>, ) -> Result<RecurrenceSeriesDetail>
pub async fn recurrence_history_at( &self, workspace_id: &WorkspaceId, series_id: &RecurrenceSeriesId, at: DateTime<Utc>, offset: usize, limit: usize, ) -> Result<RecurrenceHistoryPage>
pub async fn list_recurrence_series( &self, workspace_id: &WorkspaceId, ) -> Result<Vec<RecurrenceSeriesSummary>>
pub async fn recurrence_series_detail( &self, workspace_id: &WorkspaceId, series_id: &RecurrenceSeriesId, ) -> Result<RecurrenceSeriesDetail>
pub async fn recurrence_history( &self, workspace_id: &WorkspaceId, series_id: &RecurrenceSeriesId, offset: usize, limit: usize, ) -> Result<RecurrenceHistoryPage>
pub async fn list_project_items( &self, workspace_id: &WorkspaceId, ) -> Result<Vec<ProjectListItem>>
pub async fn list_task_items( &self, workspace_id: &WorkspaceId, filters: TaskFilters, mode: TaskQueryMode, sort: TaskSort, direction: SortDirection, ) -> Result<Vec<TaskListItem>>
pub async fn list_bulk_update_task_items( &self, workspace_id: &WorkspaceId, filters: TaskFilters, mode: TaskQueryMode, sort: TaskSort, direction: SortDirection, ) -> Result<Vec<TaskListItem>>
pub async fn list_task_items_without_activity_from_current_projection( &self, workspace_id: &WorkspaceId, filters: TaskFilters, mode: TaskQueryMode, sort: TaskSort, direction: SortDirection, ) -> Result<Vec<TaskListItem>>
pub async fn list_task_summary_items( &self, workspace_id: &WorkspaceId, filters: TaskFilters, mode: TaskQueryMode, sort: TaskSort, direction: SortDirection, limit: Option<usize>, ) -> Result<Vec<TaskListItem>>
pub async fn list_recent_actions( &self, workspace_id: &WorkspaceId, project_scope: Option<&str>, ) -> Result<Vec<RecentActionItem>>
pub async fn task_activity_for_task( &self, workspace_id: &WorkspaceId, task_id: &TaskId, ) -> Result<Vec<RecentActionItem>>
pub async fn search_task_items( &self, workspace_id: &WorkspaceId, query: TaskSearchQuery, ) -> Result<Vec<TaskSearchResult>>
pub async fn search_task_occurrence_items( &self, workspace_id: &WorkspaceId, query: TaskSearchQuery, ) -> Result<Vec<TaskSearchResult>>
pub async fn search_task_preview_set( &self, workspace_id: &WorkspaceId, query: TaskSearchQuery, ) -> Result<TaskSearchPreviewResultSet>
pub async fn task_detail(&self, task: &Task) -> Result<TaskDetail>
pub async fn task_detail_with_display_refs( &self, task: &Task, display_refs: &DisplayRefContext, ) -> Result<TaskDetail>
pub async fn conflict_display_value( &self, workspace_id: &WorkspaceId, field: &str, value: &str, ) -> Result<String>
pub async fn task_dependency_summary( &self, workspace_id: &WorkspaceId, task_id: &TaskId, ) -> Result<TaskDependencySummary>
pub async fn workspace_task_counts( &self, workspace_id: &WorkspaceId, ) -> Result<WorkspaceTaskCounts>
pub async fn unresolved_conflict_count(&self) -> Result<i64>
pub async fn unresolved_task_conflict_count_in_workspace( &self, workspace_id: &WorkspaceId, ) -> Result<i64>
pub async fn sync_history_stats(&self) -> Result<SyncHistoryStats>
pub async fn database_stats( &self, workspace: &Workspace, ) -> Result<DatabaseStats>
Source§impl Database
impl Database
pub async fn display_ref_context( &self, workspace_id: &WorkspaceId, ) -> Result<DisplayRefContext>
pub async fn display_refs_for_task_ids( &self, workspace_id: &WorkspaceId, task_ids: &[TaskId], ) -> Result<HashMap<TaskId, String>>
pub async fn resolve_task_ref( &self, workspace: &Workspace, input: &str, ) -> Result<Task>
Source§impl Database
impl Database
Sourcepub async fn missing_sync_attachment_counts(&self) -> Result<ByteCount>
pub async fn missing_sync_attachment_counts(&self) -> Result<ByteCount>
Accepted attachments whose image bytes are missing on this device.
Sourcepub async fn missing_setup_attachment_counts(
&self,
blob_dir: &Path,
) -> Result<ByteCount>
pub async fn missing_setup_attachment_counts( &self, blob_dir: &Path, ) -> Result<ByteCount>
Live setup images whose object file is absent, regardless of the inventory’s last-known availability bit.
Source§impl Database
impl Database
Sourcepub async fn publish_bootstrap(
&self,
auth: &Authentication<'_>,
request: PublishBootstrap<'_>,
policy: PublicationPolicy,
) -> Result<PublicationOutcome>
pub async fn publish_bootstrap( &self, auth: &Authentication<'_>, request: PublishBootstrap<'_>, policy: PublicationPolicy, ) -> Result<PublicationOutcome>
Atomically publishes one complete immutable candidate and signed successor. This does not adopt the seed, install a client, or enable encrypted tail sync.
Source§impl Database
impl Database
Sourcepub async fn declare_bootstrap_staging(
&self,
auth: &Authentication<'_>,
descriptor: &[u8],
budget: Budget,
) -> Result<StagingStatus>
pub async fn declare_bootstrap_staging( &self, auth: &Authentication<'_>, descriptor: &[u8], budget: Budget, ) -> Result<StagingStatus>
Authenticated declaration also ensures the initial staging reservation. Descriptor and budgets are immutable. Expired retries resume retained bytes.
Sourcepub async fn bootstrap_staging_status(
&self,
auth: &Authentication<'_>,
bootstrap_id: [u8; 32],
) -> Result<Status>
pub async fn bootstrap_staging_status( &self, auth: &Authentication<'_>, bootstrap_id: [u8; 32], ) -> Result<Status>
Read-only, including for missing/expired candidates. No reservation renewal. Callers compare the returned commitment with their frozen local descriptor. Missing is an observation, never a terminal cancellation fence.
pub async fn ensure_bootstrap_staging( &self, auth: &Authentication<'_>, bootstrap_id: [u8; 32], descriptor_commitment: [u8; 32], ) -> Result<StagingStatus>
Sourcepub async fn cancel_bootstrap_staging(
&self,
auth: &Authentication<'_>,
bootstrap_id: [u8; 32],
) -> Result<Status>
pub async fn cancel_bootstrap_staging( &self, auth: &Authentication<'_>, bootstrap_id: [u8; 32], ) -> Result<Status>
Terminal even before declaration. Canceled IDs consume the finite lifetime candidate budget and are never silently forgotten or reopened. Publication wins return its immutable outcome instead, without deleting any data.
Sourcepub async fn put_bootstrap_chunk(
&self,
auth: &Authentication<'_>,
request: PutChunk<'_>,
) -> Result<()>
pub async fn put_bootstrap_chunk( &self, auth: &Authentication<'_>, request: PutChunk<'_>, ) -> Result<()>
Stores one slot only after checking it against the frozen descriptor. Rejected bytes leave storage unchanged; exact retries succeed, including requests delayed across expiry and resume.
Sourcepub async fn put_bootstrap_batch(
&self,
auth: &Authentication<'_>,
request: PutBatch<'_>,
) -> Result<()>
pub async fn put_bootstrap_batch( &self, auth: &Authentication<'_>, request: PutBatch<'_>, ) -> Result<()>
Stores every record of the batch in one transaction, each checked against its slot in the frozen descriptor, or stores nothing. Records already held must match exactly, so an exact retry succeeds and any conflicting record rolls back the whole batch.
Source§impl Database
impl Database
Source§impl Database
impl Database
Sourcepub async fn encrypted_image_downloads_remaining(&self) -> Result<u64>
pub async fn encrypted_image_downloads_remaining(&self) -> Result<u64>
Images whose bytes this device still has to download. Counting reads only local state and never consumes a selection turn.
Sourcepub async fn prepare_encrypted_image_download(
&self,
a: &Authority,
) -> Result<Option<Download>>
pub async fn prepare_encrypted_image_download( &self, a: &Authority, ) -> Result<Option<Download>>
Selects and advances past one pending object before transfer. The local cursor orders attempts, not acceptance, validation or content progress.
pub async fn install_encrypted_image( &self, a: &Authority, blob_dir: &Path, download: &Download, records: &[Vec<u8>], policy: LifecyclePolicy, ) -> Result<()>
pub async fn complete_encrypted_image_from_local( &self, a: &Authority, blob_dir: &Path, download: &Download, policy: LifecyclePolicy, ) -> Result<bool>
Source§impl Database
impl Database
Sourcepub async fn prune_encrypted_images(
&self,
grace: Duration,
limit: usize,
) -> Result<usize>
pub async fn prune_encrypted_images( &self, grace: Duration, limit: usize, ) -> Result<usize>
Deletes the stored bytes of at most limit images that have been
unreferenced and unticketed for at least grace, keeping their
descriptors. Returns how many images were pruned.
pub async fn encrypted_image_exchange( &self, context: &Context, bearer: &Secret, op: Operation, policy: LifecyclePolicy, ) -> Result<Reply>
Source§impl Database
impl Database
Sourcepub async fn encrypted_round_state(
&self,
authority: &Authority,
) -> Result<RoundState>
pub async fn encrypted_round_state( &self, authority: &Authority, ) -> Result<RoundState>
One validated read of local round state. Observation never freezes work or advances the download selector.
Sourcepub async fn encrypted_tail_observed_rank(&self) -> Result<u64>
pub async fn encrypted_tail_observed_rank(&self) -> Result<u64>
Highest tail rank this replica applied or accepted. An honest allocator mark is never below a rank it assigned.
Sourcepub async fn prepare_encrypted_push(
&self,
authority: &Authority,
blob_dir: &Path,
) -> Result<Option<Push>>
pub async fn prepare_encrypted_push( &self, authority: &Authority, blob_dir: &Path, ) -> Result<Option<Push>>
Returns the frozen head, or freezes the next ordered pending change. Image heads also return exact staged ciphertext for upload.
Sourcepub async fn prepare_encrypted_batch_in_run(
&self,
authority: &Authority,
blob_dir: &Path,
preflight: Option<Preflight>,
count: usize,
) -> Result<(Option<Push>, Option<Preflight>)>
pub async fn prepare_encrypted_batch_in_run( &self, authority: &Authority, blob_dir: &Path, preflight: Option<Preflight>, count: usize, ) -> Result<(Option<Push>, Option<Preflight>)>
Freezes the next ordered pending group in one serialized push run. Reuses only the checked window while the local mutation sequence is unchanged.
Sourcepub async fn reconcile_encrypted_tail_absence(
&self,
authority: &Authority,
absence: &AbsentOperation,
blob_dir: &Path,
) -> Result<bool>
pub async fn reconcile_encrypted_tail_absence( &self, authority: &Authority, absence: &AbsentOperation, blob_dir: &Path, ) -> Result<bool>
Closed-generation absence and replacement commit under one outbox/history owner. A failed transaction retains old bytes and requires a new lookup on retry.
pub async fn reconcile_encrypted_tail_absences( &self, authority: &Authority, absences: &[AbsentOperation], blob_dir: &Path, ) -> Result<bool>
Sourcepub async fn observe_encrypted_tail(
&self,
authority: &Authority,
mapping: &Mapping,
) -> Result<Vec<u8>>
pub async fn observe_encrypted_tail( &self, authority: &Authority, mapping: &Mapping, ) -> Result<Vec<u8>>
Retain an observed immutable outcome before fetching a different representation.
pub async fn verify_encrypted_tail_outcome( &self, authority: &Authority, accepted: &Accepted, ) -> Result<()>
pub async fn encrypted_tail_has_batch_work( &self, authority: &Authority, ) -> Result<bool>
Sourcepub async fn encrypted_tail_frozen_records(
&self,
authority: &Authority,
) -> Result<Vec<(String, Vec<u8>)>>
pub async fn encrypted_tail_frozen_records( &self, authority: &Authority, ) -> Result<Vec<(String, Vec<u8>)>>
Returns the immutable unresolved inventory in dispatch order.
Sourcepub async fn accept_encrypted_tail_batch(
&self,
authority: &Authority,
mappings: &[Mapping],
) -> Result<()>
pub async fn accept_encrypted_tail_batch( &self, authority: &Authority, mappings: &[Mapping], ) -> Result<()>
Accepts exact frozen ciphertext together with every local domain effect.
pub async fn apply_encrypted_tail_page( &self, authority: &Authority, page: &Page, ) -> Result<()>
Source§impl Database
impl Database
pub async fn encrypted_tail_exchange( &self, context: &Context, bearer: &Secret, op: Operation, ) -> Result<Reply>
pub async fn encrypted_tail_batch_exchange( &self, context: &Context, bearer: &Secret, op: BatchOperation, ) -> Result<BatchReply>
Source§impl Database
impl Database
Sourcepub async fn sync_persistence_status(&self) -> Result<SyncPersistenceStatus>
pub async fn sync_persistence_status(&self) -> Result<SyncPersistenceStatus>
Local sync bookkeeping; reads no protected keys and contacts no server.
Source§impl Database
impl Database
pub async fn prepare_membership_management( &self, auth: &Authentication<'_>, ) -> Result<ManagementPreparation>
pub async fn apply_membership_management( &self, auth: &Authentication<'_>, record: &[u8], ) -> Result<Vec<u8>>
Source§impl Database
impl Database
Sourcepub async fn verify_membership_history(&self) -> Result<()>
pub async fn verify_membership_history(&self) -> Result<()>
Replays the complete stored membership history and fills the cache. Servers run this before accepting requests; storage without published membership has nothing to verify.
Sourcepub async fn membership_evidence(
&self,
auth: &Authentication<'_>,
) -> Result<Evidence>
pub async fn membership_evidence( &self, auth: &Authentication<'_>, ) -> Result<Evidence>
This read alone accepts a verified ancestor head, after current credential authentication.
pub async fn register_membership_invitation_at( &self, auth: &Authentication<'_>, raw: &[u8], time: i64, ) -> Result<RegistrationStatus>
pub async fn post_membership_request_at( &self, vault: [u8; 32], handle: [u8; 32], request: &[u8], time: i64, ) -> Result<()>
pub async fn membership_mailbox( &self, vault: [u8; 32], handle: [u8; 32], ) -> Result<Mailbox>
Sourcepub async fn cancel_membership_invitation_at(
&self,
auth: &Authentication<'_>,
handle: [u8; 32],
time: i64,
) -> Result<CancelStatus>
pub async fn cancel_membership_invitation_at( &self, auth: &Authentication<'_>, handle: [u8; 32], time: i64, ) -> Result<CancelStatus>
Terminally fences a registered, unadmitted invitation of the caller so no new admission can commit. Serialized with admission; idempotent. Unknown handles allocate nothing.
pub async fn admit_membership_device_at( &self, auth: &Authentication<'_>, handle: [u8; 32], record: &[u8], time: i64, ) -> Result<Vec<u8>>
Source§impl Database
impl Database
pub async fn peer_target_preflight(&self) -> Result<String>
Sourcepub async fn peer_retry_preflight(
&self,
identity: [u8; 32],
client: &str,
guard: &InstallationGuard,
) -> Result<()>
pub async fn peer_retry_preflight( &self, identity: [u8; 32], client: &str, guard: &InstallationGuard, ) -> Result<()>
Rechecks that this pinned peer join is unfinished: nothing installed, associated or set up, and the domain still empty. The enrollment pin and installation fence stay in place.
pub async fn enrollment_pin(&self) -> Result<Option<([u8; 32], String, String)>>
pub async fn pin_enrollment( &self, identity: [u8; 32], client: &str, role: &str, guard: &InstallationGuard, ) -> Result<()>
pub async fn adopted_enrollment_client(&self) -> Result<String>
pub async fn enrollment_artifact(&self, kind: &str) -> Result<Option<Vec<u8>>>
pub async fn enrollment_artifacts(&self) -> Result<HashMap<String, Vec<u8>>>
Sourcepub async fn enrollment_artifact_marker(&self) -> Result<i64>
pub async fn enrollment_artifact_marker(&self) -> Result<i64>
Monotonic, nonsecret marker for write-once enrollment state changes.
pub async fn pin_enrollment_artifact( &self, identity: [u8; 32], kind: &str, digest: [u8; 32], ) -> Result<()>
Source§impl Database
impl Database
Sourcepub async fn admit_seed_claim(
&self,
request: &[u8],
authentication: ClaimAuthentication<'_>,
) -> Result<ClaimResult>
pub async fn admit_seed_claim( &self, request: &[u8], authentication: ClaimAuthentication<'_>, ) -> Result<ClaimResult>
Admits one immutable sequence-zero claim under operator setup authority. The storage’s unexpired issued verifier is read in this claim transaction, so a concurrent reissue either precedes the claim or finds the storage claimed. Exact authenticated retries return the original result without reissuance. This does not authorize uploads, READY, or ordinary plaintext sync.
Sourcepub async fn e2ee_server_is_claimed(&self) -> Result<bool>
pub async fn e2ee_server_is_claimed(&self) -> Result<bool>
Whether encrypted server storage already has its immutable seed claim.
Sourcepub async fn local_seed_genesis_commitment(&self) -> Result<Option<[u8; 32]>>
pub async fn local_seed_genesis_commitment(&self) -> Result<Option<[u8; 32]>>
Nonsecret loss-detection pin. This is never a substitute for host authority.
Sourcepub async fn pin_local_seed_genesis(&self, genesis: &Genesis) -> Result<()>
pub async fn pin_local_seed_genesis(&self, genesis: &Genesis) -> Result<()>
Hosts call this only after protected storage has committed exact authority. An old or replaced database may acquire a pin but cannot change one.
Sourcepub async fn mark_local_seed_claim_refused(&self, reason: &str) -> Result<()>
pub async fn mark_local_seed_claim_refused(&self, reason: &str) -> Result<()>
Records that a server refused this unfenced provisional claim. Refusals are unauthenticated, so the seed authority stays for an exact retry; hosts present the database as not set up until the next claim attempt.
pub async fn clear_local_seed_claim_refused(&self) -> Result<()>
pub async fn local_seed_claim_refused(&self) -> Result<bool>
Sourcepub async fn rollback_local_seed_genesis(
&self,
expected: [u8; 32],
) -> Result<()>
pub async fn rollback_local_seed_genesis( &self, expected: [u8; 32], ) -> Result<()>
Removes an abandoned provisional seed pin and its recorded refusal. Once source authority or publication state exists, the installation is fenced and this operation refuses to undo it.
Sourcepub async fn issue_e2ee_server_setup(
&self,
secret: &Secret,
fresh_id: [u8; 32],
expires_at: u64,
) -> Result<[u8; 32]>
pub async fn issue_e2ee_server_setup( &self, secret: &Secret, fresh_id: [u8; 32], expires_at: u64, ) -> Result<[u8; 32]>
Issues operator setup authority for secret on encrypted server
storage and returns its setup ID. An existing ID is kept, even after
expiry, so a device whose genesis already binds it can claim with the
reissued secret; the replaced verifier refuses earlier secrets. Claimed
storage and storage holding local domain data cannot take a new verifier.
Sourcepub async fn e2ee_server_setup(
&self,
now: u64,
) -> Result<Option<SetupAuthority>>
pub async fn e2ee_server_setup( &self, now: u64, ) -> Result<Option<SetupAuthority>>
The configured setup verifier while it is unexpired at now (Unix seconds).
Sourcepub async fn is_e2ee_server_storage(&self) -> Result<bool>
pub async fn is_e2ee_server_storage(&self) -> Result<bool>
True once storage was prepared for, or claimed by, an encrypted vault. Refuses marked server storage containing local domain data.
Sourcepub async fn has_change_history(&self) -> Result<bool>
pub async fn has_change_history(&self) -> Result<bool>
True when storage holds change rows. Encrypted server storage never does, so server launch refuses such storage as unsupported.
Source§impl Database
impl Database
pub async fn seed_source_pin(&self) -> Result<Option<Vec<u8>>>
Sourcepub async fn bind_seed_source(
&self,
source: &SeedSourceAuthority,
installation: &InstallationGuard,
) -> Result<()>
pub async fn bind_seed_source( &self, source: &SeedSourceAuthority, installation: &InstallationGuard, ) -> Result<()>
Called under the installation interlock after protected persistence.
pub async fn seed_publication_intent_bytes( &self, ) -> Result<Option<(Vec<u8>, String)>>
Sourcepub async fn prepare_seed_publication_intent(
&self,
source: &SeedSourceAuthority,
seed: &SeedAuthority,
key: &LocalSharedStatePackageKey,
) -> Result<SeedPublicationIntent>
pub async fn prepare_seed_publication_intent( &self, source: &SeedSourceAuthority, seed: &SeedAuthority, key: &LocalSharedStatePackageKey, ) -> Result<SeedPublicationIntent>
Commits cancellation exclusion before any protected intent is exposed. Retrying returns exact persisted bytes, never a newly signed context.
Sourcepub async fn seal_seed_publication_intent(
&self,
source: &SeedSourceAuthority,
intent: &SeedPublicationIntent,
) -> Result<()>
pub async fn seal_seed_publication_intent( &self, source: &SeedSourceAuthority, intent: &SeedPublicationIntent, ) -> Result<()>
Hosts supply an intent reloaded from protected storage, never a boolean.
Sourcepub async fn cleanup_adopted_seed_capture(
&self,
source: &SeedSourceAuthority,
intent: &SeedPublicationIntent,
) -> Result<()>
pub async fn cleanup_adopted_seed_capture( &self, source: &SeedSourceAuthority, intent: &SeedPublicationIntent, ) -> Result<()>
Separate post-commit cleanup. Durable authority/receipt never cascades away.
Source§impl Database
impl Database
Reports frozen package ownership, including missing-byte corruption. A true result requires the host to load existing protected authority, never generate a replacement key.
Encrypts the durable never-dispatched capture or returns its frozen package.
The first successful call freezes the descriptor, catalogs and encrypted
records in one SQLite transaction under the capture candidate ID.
Tentative preparation before that commit can be retried. Later calls
authenticate and return the exact saved bytes without reading image files.
membership_predecessor is context only, not proof of authorization.
Changed keys/context, incomplete data and incompatible local-only packages
fail without replacement. Cancellation releases bytes and ownership together.
SQLite commit/reopen is not a claim of platform power-loss durability.
Authenticates, decrypts, validates, and atomically installs a package.
All package bytes are checked before the target database transaction is opened. Installation still enforces the existing empty-target boundary.
Source§impl Database
impl Database
Sourcepub async fn published_snapshot_read(
&self,
auth: &Authentication<'_>,
descriptor: [u8; 32],
component: Option<Component>,
index: u64,
) -> Result<Vec<u8>>
pub async fn published_snapshot_read( &self, auth: &Authentication<'_>, descriptor: [u8; 32], component: Option<Component>, index: u64, ) -> Result<Vec<u8>>
Copies one published record inside the current-membership transaction. Image bytes are read from lifecycle ownership, never staging or restored.
Sourcepub async fn peer_snapshot_receipt(
&self,
verified: &VerifiedEnrollment,
enrollment: [u8; 32],
client: &str,
guard: &InstallationGuard,
) -> Result<Option<SharedStateInstallReport>>
pub async fn peer_snapshot_receipt( &self, verified: &VerifiedEnrollment, enrollment: [u8; 32], client: &str, guard: &InstallationGuard, ) -> Result<Option<SharedStateInstallReport>>
Receipt lookup still requires independently verified protected authority. It never repairs a receipt or resets a later cursor or domain edit.
Sourcepub async fn install_peer_snapshot(
&self,
verified: &VerifiedEnrollment,
enrollment: [u8; 32],
client: &str,
guard: &InstallationGuard,
package: &Metadata,
) -> Result<SharedStateInstallReport>
pub async fn install_peer_snapshot( &self, verified: &VerifiedEnrollment, enrollment: [u8; 32], client: &str, guard: &InstallationGuard, package: &Metadata, ) -> Result<SharedStateInstallReport>
Authenticated metadata and mappings commit independently of image bytes.
Source§impl Database
impl Database
Creates or resumes the one durable, never-dispatched local capture.
The snapshot, exact history map, stable candidate and stream identities, image classification, ownership pins, counter floor, and sync fence commit in one immediate transaction. An existing capture is resumed without reading current domain rows or attachment bytes again.
Captures setup state while checking that inventory marked available is still present on disk. Files missing at this boundary are published as unavailable; other filesystem failures remain explicit errors.
Reopens the durable local capture without consulting newer domain rows.
Cancels only the given candidate’s never-dispatched capture and releases its pins.
Repeating cancellation after success is harmless. A different active candidate fails closed. Domain rows and later edits are never removed.
Atomically installs captured shared state into a fresh database.
The target keeps its own client identity and local settings. Retained history receives dense effective prefix ranks, while source ordering provenance remains separate. Attachment metadata is installed without claiming that image bytes are locally available.
Source§impl Database
impl Database
pub async fn task_field_value( &self, workspace_id: &WorkspaceId, task_id: &TaskId, field: &str, ) -> Result<String>
pub async fn task_labels( &self, workspace_id: &WorkspaceId, task_id: &TaskId, ) -> Result<Vec<String>>
pub async fn task_undo_snapshot( &self, workspace_id: &WorkspaceId, task_id: &TaskId, ) -> Result<TaskUndoSnapshot>
pub async fn conflict_row_id( &self, workspace_id: &WorkspaceId, task_id: &TaskId, field: &str, ) -> Result<i64>
pub async fn clear_pending_tui_undo_entries(&self) -> Result<()>
pub async fn latest_tui_undo_presentation( &self, workspace_id: &WorkspaceId, ) -> Result<Option<PendingUndoPresentation>>
pub async fn apply_latest_tui_undo( &self, workspace_id: &WorkspaceId, ) -> Result<Option<UndoOutcome>>
Source§impl Database
impl Database
pub async fn list_workspaces(&self) -> Result<Vec<Workspace>>
pub async fn list_workspace_open_summaries( &self, ) -> Result<Vec<WorkspaceOpenSummary>>
pub async fn find_workspace( &self, name_or_key: &str, ) -> Result<Option<Workspace>>
pub async fn workspace_for_id( &self, workspace_id: &WorkspaceId, ) -> Result<Workspace>
pub async fn resolve_workspace(&self, name_or_key: &str) -> Result<Workspace>
pub async fn resolve_required_workspace( &self, name_or_key: &str, source: &str, ) -> Result<Workspace>
pub async fn create_workspace(&self, name: &str) -> Result<Workspace>
pub async fn rename_workspace( &self, workspace_ref: &str, new_name: &str, ) -> Result<Workspace>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Database
impl !UnwindSafe for Database
impl Freeze 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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.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 moreSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.