Skip to main content

PostgresStorage

Struct PostgresStorage 

Source
pub struct PostgresStorage { /* private fields */ }
Expand description

PostgreSQL-backed storage with connection pooling and optional multi-tenancy.

Implementations§

Source§

impl PostgresStorage

Source

pub async fn connect(database_url: &str) -> Result<Self, StorageError>

Connect to Postgres with the default tenant.

Source

pub async fn connect_tenant( database_url: &str, tenant_id: &str, ) -> Result<Self, StorageError>

Connect to Postgres with a specific tenant ID for data isolation.

Applies the default pool size cap (DEFAULT_POOL_SIZE).

Source

pub async fn connect_tenant_with_pool_size( database_url: &str, tenant_id: &str, max_size: usize, ) -> Result<Self, StorageError>

Connect to Postgres with a specific tenant ID and an explicit pool size cap (v2-M1). max_size is clamped to at least 1.

Source

pub fn connect_tenant_blocking( database_url: &str, tenant_id: &str, max_size: usize, ) -> Result<Self, StorageError>

Connect from synchronous code. Needs no async runtime, and also works when called from inside one.

Source

pub fn for_tenant(&self, tenant_id: &str) -> Result<Self, StorageError>

A storage for another tenant on this storage’s connection pool, for a host that serves many tenants from one process. Every tenant opened this way shares the one pool, so the pool’s size caps the connections the process holds however many tenants it opens, and they share its TLS setup. Tenants stay apart as they do across processes: every row carries its tenant, and every query filters on it.

Cheap enough for a tenant’s first request: the schema was brought up to date when this storage connected, so opening a tenant only stores its default namespace if it has none. The new storage has its own sweep lock and this storage’s GC grace period. Works from any thread, like the rest of the storage API.

Source

pub fn with_gc_grace(self, grace: Duration) -> Self

Set how recently written an unreachable object must be for a GC sweep to spare it (default DEFAULT_GC_GRACE).

Writers don’t wait for a sweep here; the grace period protects them instead. A write stores its new objects before it commits them, and an object stored again refreshes its write time (at most a minute old after any write), so a sweep never takes an object a write in flight is about to commit. A sweep spares everything written since it started, whatever the grace. A grace under a minute narrows the protection for writes already in flight when a sweep starts; tests use zero to see garbage go at once.

Source

pub fn pool_max_size(&self) -> usize

Return the configured pool’s maximum size. Useful for tests.

Source

pub fn tenant_pool(&self) -> TenantPool

The storage’s connection pool, for its tenant: configured as for the storage itself (TLS, pool size), with every query recorded as a database span, and every connection it hands out has the tenant set (TENANT_SETTING). For a host that keeps tables of its own in the same database: scope their rows by the tenant all the same, add the tenant policy to each (add_tenant_policy) so row-level security covers them, and use the pool inside PostgresStorage::run, so a connection it opens is driven by the storage’s runtime like the storage’s own, not by a caller’s runtime that may be gone when the connection is reused. Take the pool before handing the storage to a Repository. Create the tables in a transaction holding an advisory lock (pg_advisory_xact_lock): CREATE TABLE IF NOT EXISTS from two processes at once can still fail on Postgres’s catalog index. The client crates are re-exported as agentstategraph_storage::{oxtel_sql, tokio_postgres}.

Source

pub fn pool(&self) -> Pool

👎Deprecated since 1.5.0:

use tenant_pool(): a connection from pool() carries whichever tenant used it last, so row-level security can’t back up its queries

The storage’s connection pool, raw: its connections don’t set a tenant, so one carries whichever tenant used it last, and row-level security can’t back up a query on it.

Source

pub fn tenant_id(&self) -> &str

The tenant this storage reads and writes.

Source

pub fn row_security(&self) -> Result<RowSecurity, StorageError>

Where row-level security stands in the storage’s schema, table by table, and whether this connection’s role skips it.

Source

pub fn set_row_security(&self, on: bool) -> Result<RowSecurity, StorageError>

Switch row-level security on or off for every table in the storage’s schema that has the tenant policy, AgentStateGraph’s and a host’s alike, and return where it then stands. On means enabled and forced, so it binds the tables’ owner too: a statement sees and writes only the rows of its connection’s tenant (TENANT_SETTING), a backstop behind every query’s own tenant filter.

It’s off until switched on, per database. Every connection the storage checks out already has its tenant set, so the processes using the database needn’t restart. It doesn’t cover a superuser or a role with BYPASSRLS (see RowSecurity::role_bypasses), so connect as a role with neither; nor a connection from the deprecated pool.

Run it as the role that owns the tables. It locks each table briefly, under the schema setup lock, and gives up if it waits 10 seconds for one. With it on, pg_dump run as the tables’ owner fails rather than dump only some rows: dump as a superuser or a role with BYPASSRLS.

Source

pub fn run<F, T>(f: F) -> T
where F: Future<Output = T> + Send, T: Send,

Run f to completion on the storage’s runtime (one per process), from whatever kind of thread the caller is on: a plain thread, or a thread of either kind of tokio runtime. Every synchronous storage method goes through this; a host uses it with pool for its own tables. (Before Plan D t-002 this assumed a multi-threaded tokio runtime: plain threads panicked, as did single-threaded runtimes.)

Trait Implementations§

Source§

impl CommitStore for PostgresStorage

Source§

fn list_commits( &self, from: &ObjectId, limit: usize, ) -> Result<Vec<Commit>, StorageError>

The first-parent line in one recursive query, instead of one round trip per commit.

Source§

fn list_commits_dag( &self, from: &ObjectId, limit: usize, ) -> Result<CommitWalk, StorageError>

Every parent edge in one recursive query. UNION keeps each commit once however many paths reach it, so merge-heavy histories stay linear, and the walk stops once it has one commit more than limit (which is how truncation is detected). Commits come out breadth first; order within one generation is unspecified. Each parent is looked up through LATERAL ... LIMIT 1, which keeps the step an index lookup: given a plain join, the planner may hash the tenant’s whole commit table instead.

Source§

fn history_extract_batch( &self, batch_size: usize, ) -> Result<usize, StorageError>

Fold the next commits into the history tables, as the SQLite backend does, but ordered by the id of the transaction that wrote each commit rather than by insertion order. With several writers, a commit can become visible after a later-inserted one has already been folded, and an insertion-order cursor would step past it for good. Only commits whose transaction is older than every transaction still running are read, so no commit can appear behind the cursor later. When commits are waiting on an older transaction, this waits up to HISTORY_WAIT for it to finish; a writing transaction that runs longer than that, anywhere on the server, delays history until it ends.

Source§

fn history_cursor(&self) -> Result<i64, StorageError>

How many commits have been folded. (SQLite reports its last folded rowid; either way it only grows, and 0 means nothing is extracted.)

Source§

fn history_gc_sweep( &self, roots: &[ObjectId], batch: usize, ) -> Result<GcSweep, StorageError>

Mark everything reachable from roots, the current ref tips and the pinned roots, then delete this tenant’s other objects in batches, each its own transaction. Writers keep going meanwhile: whatever was written since the sweep started, or within the grace period before it, is spared, and each delete re-checks the write time, so an object stored again mid-sweep stays. deleted_target can therefore exceed objects_deleted.

Source§

fn history_gc_lock_writers(&self) -> Result<(), StorageError>

Take this tenant’s sweep lock, so two sweeps can’t run at once. Unlike SQLite’s, it doesn’t hold writers off: the grace period keeps their work safe (see PostgresStorage::with_gc_grace).

Source§

fn history_gc_unlock_writers(&self, _commit: bool) -> Result<(), StorageError>

Release the sweep lock. A sweep’s deletes are already committed batch by batch, so commit changes nothing here.

Source§

fn commit_state_roots_recent_first(&self) -> Result<Vec<ObjectId>, StorageError>

Newest first, by the order the commits’ transactions got ids (commits from before that was recorded come last, newest first by timestamp).

Source§

fn store_totals(&self) -> Result<Option<StoreTotals>, StorageError>

This tenant’s object and commit counts, and the bytes its rows take in each table (before indexes and free space; the tables are shared with other tenants). Reads every row, so it is slow on a large store. This tenant’s objects and commits. The tables are shared by tenants, so there is no size of the tenant’s own to report.

Source§

fn put_commit_traced( &self, commit: &Commit, trace: Option<&CommitTrace>, ) -> Result<(), StorageError>

Store commit and, when given, the trace it was made in. A backend that can does both in one write, which matters on every commit; the default stores one after the other.
Source§

fn set_commit_trace( &self, commit_id: &ObjectId, trace: &CommitTrace, ) -> Result<(), StorageError>

Record the trace commit_id was made in. The first record for a commit stands. Backends that don’t keep trace links ignore it.
Source§

fn get_commit_trace( &self, commit_id: &ObjectId, ) -> Result<Option<CommitTrace>, StorageError>

The trace commit_id was made in, if one was recorded.
Source§

fn all_commit_ids(&self) -> Result<Vec<ObjectId>, StorageError>

Return the ids of every commit in the store, unordered. Read more
Source§

fn get_commit(&self, id: &ObjectId) -> Result<Option<Commit>, StorageError>

Retrieve a commit by its ID.
Source§

fn put_commit(&self, commit: &Commit) -> Result<(), StorageError>

Store a commit.
Source§

fn has_commit(&self, id: &ObjectId) -> Result<bool, StorageError>

Check if a commit exists.
Source§

fn history_undistilled_commit_count(&self) -> Result<i64, StorageError>

Count commits not yet folded into the history tables — those with a rowid beyond the extractor cursor (Plan B t-002). 0 means the extractor is caught up, so every commit’s signal is distilled and the GC can safely make historical state unmaterializable. Backends without history report 0 (they have no distillation gate).
Source§

fn history_is_commit_distilled( &self, id: &ObjectId, ) -> Result<bool, StorageError>

Whether id’s commit has been folded into the history tables — i.e. its position is at or before the extractor cursor. This is the “already captured” predicate Plan B’s GC checks before pruning a commit’s raw snapshot: a distilled commit’s signal survives in the metric tables. Backends without history report false (nothing distilled → prune nothing on this basis).
Source§

fn history_rollup(&self) -> Result<Vec<HistoryRollupRow>, StorageError>

Read the commit-history rollup, ordered by (day, namespace, agent, intent category).
Source§

fn history_milestones( &self, limit: usize, ) -> Result<Vec<HistoryMilestoneRow>, StorageError>

Read the milestone timeline in chronological order, most recent first, capped at limit.
Source§

fn history_retained_state_roots(&self) -> Result<Vec<ObjectId>, StorageError>

State roots the GC must keep reachable: the snapshots preserved by recorded milestones (the human-meaningful spine). Distinct, order unspecified.
Source§

fn history_gc_reachability( &self, roots: &[ObjectId], batch: usize, ) -> Result<GcReachability, StorageError>

Mark every object reachable from roots (state roots) and report live vs. total object counts — the GC reclaimable estimate (Plan B t-001). Read more
Source§

fn gc_pin_root(&self, key: &str, root: &ObjectId) -> Result<(), StorageError>

Record root under key as reachable-but-uncommitted (an open speculation’s base or working tree), so a GC sweep — in this process or any other sharing the store — keeps every object it references. Replaces any earlier root for key and refreshes its age.
Source§

fn gc_unpin_root(&self, key: &str) -> Result<(), StorageError>

Remove the pin recorded by gc_pin_root. A no-op when absent.
Source§

fn gc_pinned_roots( &self, max_age: Duration, ) -> Result<Vec<ObjectId>, StorageError>

Every pinned root refreshed within max_age. Older pins belong to a process that died with a speculation open, and stop protecting their objects once they expire.
Source§

fn history_store_shape(&self) -> Result<StoreShape, StorageError>

Measure the physical shape of the store (Plan A t-003): object/commit counts, total bytes, and per-table bytes when the backend can report them. Backends that can’t return an empty StoreShape.
Source§

fn history_unpin_legacy_milestones(&self) -> Result<usize, StorageError>

Stop pinning snapshots whose checkpoint never asked to be pinned. Read more
Source§

fn history_vacuum(&self) -> Result<VacuumStats, StorageError>

Compact the store, returning freed pages to the OS (Plan B t-004). A full VACUUM — the sweep frees pages to the freelist, but the file only shrinks after this. Reports bytes before/after. Backends without a file report zeros.
Source§

impl EpochStore for PostgresStorage

Source§

fn create_epoch(&self, epoch: &Epoch) -> Result<(), StorageError>

Insert a newly-created epoch. If an epoch with the same id already exists, implementations may return StorageError::Backend — the repo layer is expected to guard uniqueness.
Source§

fn seal_epoch( &self, id: &str, summary: &str, sealed_at: DateTime<Utc>, sealed_commits: &[ObjectId], seal_hash: &ObjectId, ) -> Result<(), StorageError>

Seal an epoch: flip its status to Sealed, stamp sealed_at, record the seal summary, and persist the set of commits that must remain reachable for seal-violation enforcement (V8). Subsequent set_commit_epoch calls referencing this id must fail with EpochAlreadySealed. seal_hash is the tamper-evident digest over the sealed set; it is persisted, not recomputed on read, so a later walk cannot quietly produce a different answer than the one that was sealed.
Source§

fn assign_epoch_namespace( &self, id: &str, namespace: &str, ) -> Result<bool, StorageError>

Assign a workspace to an epoch that does not have one yet. Read more
Source§

fn list_epochs(&self) -> Result<Vec<Epoch>, StorageError>

List all epochs, most-recent first.
Source§

fn get_epoch(&self, id: &str) -> Result<Option<Epoch>, StorageError>

Fetch a single epoch by id.
Source§

fn archive_epoch(&self, id: &str) -> Result<(), StorageError>

Transition a sealed epoch to Archived. Fails if the epoch is not found or is not in the Sealed state.
Source§

fn set_commit_epoch( &self, commit_id: &ObjectId, epoch_id: &str, ) -> Result<(), StorageError>

Associate a commit with the given epoch. Must reject if the epoch is already sealed.
Source§

impl ObjectStore for PostgresStorage

Source§

fn batch_put_objects( &self, objs: &[Object], ) -> Result<Vec<ObjectId>, StorageError>

One multi-row INSERT per chunk, all in one transaction: callers such as merge write a batch as a unit, and the trait’s default made one independent round trip per object.

Source§

fn batch_get_objects( &self, ids: &[ObjectId], ) -> Result<Vec<Option<Object>>, StorageError>

One query for the whole batch, results in the order asked.

Case-insensitive substring match. The trigram index serves it when pg_trgm is installed; %, _ and \ in the query match themselves.

Source§

fn get_object(&self, id: &ObjectId) -> Result<Option<Object>, StorageError>

Retrieve an object by its ID. Returns None if not found.
Source§

fn put_object(&self, obj: &Object) -> Result<ObjectId, StorageError>

Store an object. Returns its ObjectId (which is its content hash). Storing an object that already exists is a no-op (idempotent).
Source§

fn leaf_index_is_built( &self, namespace: &str, ref_name: &str, ) -> Result<bool, StorageError>

Whether the (namespace, ref) leaf set has been built.
Source§

fn leaf_index_build( &self, namespace: &str, ref_name: &str, entries: &[(String, String)], ) -> Result<(), StorageError>

One-time backfill: replace any existing rows for (namespace, ref) with entries and mark the set built. Called once, from the read path, the first time a ref is searched after the feature is enabled.
Source§

fn leaf_index_apply( &self, namespace: &str, ref_name: &str, removed_paths: &[String], added: &[(String, String)], ) -> Result<(), StorageError>

Incremental maintenance: for a built (namespace, ref), delete the rows at removed_paths and insert added (path, value) rows. A no-op if the set has not been built (the backfill will pick up the new state). Called from the write path as a ref advances.
Source§

fn leaf_index_tracks_roots(&self) -> bool

Whether this backend records the state root of each built set, through leaf_index_root, leaf_index_build_at and leaf_index_advance.
Source§

fn leaf_index_root( &self, namespace: &str, ref_name: &str, ) -> Result<Option<ObjectId>, StorageError>

The state root the (namespace, ref) set reflects. None when it isn’t built, was built or changed without a root, or the backend doesn’t record roots.
Source§

fn leaf_index_build_at( &self, namespace: &str, ref_name: &str, root: &ObjectId, entries: &[(String, String)], ) -> Result<(), StorageError>

leaf_index_build from the tree at root, recording root.
Source§

fn leaf_index_advance( &self, namespace: &str, ref_name: &str, from: &ObjectId, to: &ObjectId, removed_paths: &[String], added: &[(String, String)], ) -> Result<bool, StorageError>

Move the set from the tree at from to the tree at to, by the leaf diff between them, only if it is at from. Returns whether it moved. A backend that doesn’t record roots applies the diff unconditionally, as leaf_index_apply, and returns true.
Source§

fn has_object(&self, id: &ObjectId) -> Result<bool, StorageError>

Check if an object exists in the store.
Source§

impl RefStore for PostgresStorage

Source§

fn create_namespace(&self, namespace: &Namespace) -> Result<(), StorageError>

Create a namespace. Returns NamespaceAlreadyExists if it already exists — callers that want idempotent creation should check first or ignore that variant.
Source§

fn list_namespaces(&self) -> Result<Vec<Namespace>, StorageError>

List all known namespaces.
Source§

fn get_ref( &self, namespace: &Namespace, name: &str, ) -> Result<Option<ObjectId>, StorageError>

Get the commit ID a ref points to. Returns None if the ref doesn’t exist. Returns NamespaceNotFound if the namespace doesn’t exist.
Source§

fn set_ref( &self, namespace: &Namespace, name: &str, target: ObjectId, ) -> Result<(), StorageError>

Set a ref to point to a commit. Creates the ref if it doesn’t exist but the namespace must already exist. Returns NamespaceNotFound if the namespace hasn’t been created yet.
Source§

fn cas_ref( &self, namespace: &Namespace, name: &str, expected: ObjectId, new: ObjectId, ) -> Result<bool, StorageError>

Atomic compare-and-swap on a ref. Updates the ref only if it currently points to expected. Returns true if the swap succeeded, false if the current value didn’t match expected. Returns NamespaceNotFound if the namespace doesn’t exist.
Source§

fn create_ref( &self, namespace: &Namespace, name: &str, target: ObjectId, ) -> Result<bool, StorageError>

Create a ref only if no ref of that name exists yet. Returns true if it was created, false if one already existed (left untouched). Returns NamespaceNotFound if the namespace doesn’t exist. Read more
Source§

fn cas_delete_ref( &self, namespace: &Namespace, name: &str, expected: ObjectId, ) -> Result<bool, StorageError>

Delete a ref only if it still points to expected. Returns true if it was deleted, false if it was absent or pointed elsewhere. Returns NamespaceNotFound if the namespace doesn’t exist. Read more
Source§

fn list_refs( &self, namespace: &Namespace, prefix: &str, ) -> Result<Vec<(String, ObjectId)>, StorageError>

List all refs in namespace whose name starts with prefix. Returns NamespaceNotFound if the namespace doesn’t exist.
Source§

fn delete_ref( &self, namespace: &Namespace, name: &str, ) -> Result<bool, StorageError>

Delete a ref. Returns true if the ref existed. Returns NamespaceNotFound if the namespace doesn’t exist.
Source§

fn delete_namespace(&self, namespace: &Namespace) -> Result<bool, StorageError>

Delete a namespace and all its refs. Returns true if the namespace existed and was deleted, false if it was not found. The “default” namespace cannot be deleted and returns InvalidOperation.
Source§

impl ReminderStore for PostgresStorage

Source§

fn update_if_unchanged( &self, expected: &Reminder, new: &Reminder, ) -> Result<bool, ReminderError>

Compare and write in one transaction with the row locked, so no other writer can change the reminder in between. The trait’s default compared and wrote separately: six racing updates from one snapshot all “won”.

Source§

fn save(&self, reminder: &Reminder) -> Result<(), ReminderError>

Persist a new reminder. The id field is already populated by CreateReminder::into_reminder().
Source§

fn get(&self, id: &str) -> Result<Option<Reminder>, ReminderError>

Retrieve a reminder by ID.
Source§

fn update(&self, reminder: &Reminder) -> Result<(), ReminderError>

Overwrite the full reminder record (used after in-place mutations).
Source§

fn delete(&self, id: &str) -> Result<bool, ReminderError>

Delete a reminder permanently (hard delete, for admin use only; normal cancellation uses update with status: Cancelled).
Source§

fn list(&self, filter: &ReminderFilter) -> Result<Vec<Reminder>, ReminderError>

Return all reminders matching filter, ordered by priority then due_at ascending.
Source§

impl SessionStore for PostgresStorage

Source§

fn create_session(&self, session: &Session) -> Result<(), StorageError>

Insert a newly-created session record.
Source§

fn end_session( &self, id: &str, status: SessionStatus, ended_at: DateTime<Utc>, ) -> Result<(), StorageError>

End a session: update its status and stamp ended_at.
Source§

fn list_sessions( &self, agent_filter: Option<&str>, ) -> Result<Vec<Session>, StorageError>

List sessions, optionally filtered to those belonging to a specific agent id.
Source§

fn get_session(&self, id: &str) -> Result<Option<Session>, StorageError>

Fetch a single session by id.
Source§

fn set_commit_session( &self, commit_id: &ObjectId, session_id: &str, ) -> Result<(), StorageError>

Associate a commit with the given session. Must reject if the session has already ended.
Source§

impl TaintStore for PostgresStorage

Source§

fn create_taint(&self, taint: &Taint) -> Result<(), StorageError>

Insert a freshly-created taint record. Storage must enforce the (path, name, kind) uniqueness invariant among unresolved rows — re-creating a resolved taint with the same triple is allowed (the old one stays as an audit row).
Source§

fn resolve_taint( &self, id: &str, resolved_by: &str, reason: &str, proof: Option<&str>, resolved_at: DateTime<Utc>, ) -> Result<(), StorageError>

Mark the taint with id id as resolved. Returns StorageError::Backend (wrapping AlreadyResolved) if the record is already resolved.
Source§

fn list_taints( &self, path_prefix: Option<&str>, kind: Option<TaintKind>, include_resolved: bool, ) -> Result<Vec<Taint>, StorageError>

List taints, optionally filtered by path prefix + kind + include-resolved flag. Results are most-recently-created first.
Source§

fn check_taint(&self, request_path: &str) -> Result<Vec<Taint>, StorageError>

Return every active taint (unresolved + not expired) whose path matches request_path exactly OR whose path is a propagating ancestor of request_path. The caller feeds the result into agentstategraph_taint::evaluate_access.
Source§

fn get_taint(&self, id: &str) -> Result<Option<Taint>, StorageError>

Fetch a taint by its id. Returns None if missing.
Source§

fn set_taint_commit_id( &self, id: &str, commit_id: &str, ) -> Result<(), StorageError>

Back-patch the commit_id onto a freshly-inserted taint after the repository has written the intent commit. A no-op if the taint is already resolved.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Storage for T

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more