pub struct HttpClient<T> { /* private fields */ }Expand description
A typed /agdx/* client over an injected Transport.
Binary KV keys are base64url-encoded into the path by the client, so raw user
bytes never enter a path segment. A namespace, fork id, or projection id argument, by contrast, is placed in the path verbatim, so the caller must
pass a path-safe identifier (no /, ?, or #). Fork ids are already
constrained by validate_fork_id.
Implementations§
Source§impl<T: Transport> HttpClient<T>
impl<T: Transport> HttpClient<T>
Sourcepub fn transport(&self) -> &T
pub fn transport(&self) -> &T
The underlying transport, for a caller that needs an escape hatch.
Sourcepub async fn capabilities(&self) -> Result<Capabilities, ClientError<T::Error>>
pub async fn capabilities(&self) -> Result<Capabilities, ClientError<T::Error>>
GET /agdx/capabilities: feature-detect before showing a view.
Sourcepub async fn query(
&self,
query: &Query,
) -> Result<QueryResult, ClientError<T::Error>>
pub async fn query( &self, query: &Query, ) -> Result<QueryResult, ClientError<T::Error>>
POST /agdx/query: run a query, get the result page back.
Sourcepub async fn list_projections(
&self,
filter: &ProjectionListQuery,
) -> Result<Vec<ProjectionInfo>, ClientError<T::Error>>
pub async fn list_projections( &self, filter: &ProjectionListQuery, ) -> Result<Vec<ProjectionInfo>, ClientError<T::Error>>
GET /agdx/projections: list projections and their bindings, optionally
filtered.
Sourcepub async fn list_schemas(
&self,
filter: &SchemaListQuery,
) -> Result<Vec<SchemaInfo>, ClientError<T::Error>>
pub async fn list_schemas( &self, filter: &SchemaListQuery, ) -> Result<Vec<SchemaInfo>, ClientError<T::Error>>
GET /agdx/schemas: list registered schemas, optionally filtered.
Sourcepub async fn register_schema(
&self,
source: SchemaSource,
name: Option<String>,
version: Option<u32>,
) -> Result<u32, ClientError<T::Error>>
pub async fn register_schema( &self, source: SchemaSource, name: Option<String>, version: Option<u32>, ) -> Result<u32, ClientError<T::Error>>
POST /agdx/schemas: register a schema, get its allocated id.
Sourcepub async fn kv_get(
&self,
namespace: &str,
key: &[u8],
) -> Result<Option<KvValue>, ClientError<T::Error>>
pub async fn kv_get( &self, namespace: &str, key: &[u8], ) -> Result<Option<KvValue>, ClientError<T::Error>>
GET /agdx/kv/{namespace}/{key}: fetch one entry, or None on a 404.
The value rides the raw response body (no base64 inflation, symmetric with
kv_set), and the optional expiry rides the
KV_EXPIRES_AT_MICROS_HEADER response
header.
Sourcepub async fn kv_set(
&self,
namespace: &str,
key: &[u8],
value: &[u8],
expires_at_micros: Option<u64>,
) -> Result<(), ClientError<T::Error>>
pub async fn kv_set( &self, namespace: &str, key: &[u8], value: &[u8], expires_at_micros: Option<u64>, ) -> Result<(), ClientError<T::Error>>
PUT /agdx/kv/{namespace}/{key}: set a value, with an optional absolute
expiry (epoch microseconds).
Sourcepub async fn kv_cas(
&self,
namespace: &str,
key: &[u8],
value: &[u8],
expect: CasExpect,
expires_at_micros: Option<u64>,
) -> Result<u64, ClientError<T::Error>>
pub async fn kv_cas( &self, namespace: &str, key: &[u8], value: &[u8], expect: CasExpect, expires_at_micros: Option<u64>, ) -> Result<u64, ClientError<T::Error>>
PUT /agdx/kv/{namespace}/{key}/cas: a conditional write
(compare-and-swap). Applies value only if expect holds, returning the
new version on commit. A precondition miss surfaces as
ClientError::Api with ResultCode::Conflict (the response’s
ErrorBody.detail carries the current version). Backend-gated by the
kv_cas capability: a deployment that does not serve it answers
unsupported.
Sourcepub async fn kv_delete(
&self,
namespace: &str,
key: &[u8],
) -> Result<bool, ClientError<T::Error>>
pub async fn kv_delete( &self, namespace: &str, key: &[u8], ) -> Result<bool, ClientError<T::Error>>
DELETE /agdx/kv/{namespace}/{key}: delete one entry, returning true if it existed.
Sourcepub async fn kv_scan(
&self,
namespace: &str,
filter: &KvScanQuery,
) -> Result<KvPageView, ClientError<T::Error>>
pub async fn kv_scan( &self, namespace: &str, filter: &KvScanQuery, ) -> Result<KvPageView, ClientError<T::Error>>
GET /agdx/kv/{namespace}: scan a page of entries.
Sourcepub async fn create_fork(
&self,
body: &ForkCreateBody,
) -> Result<ForkInfo, ClientError<T::Error>>
pub async fn create_fork( &self, body: &ForkCreateBody, ) -> Result<ForkInfo, ClientError<T::Error>>
POST /agdx/forks: create a fork.
Sourcepub async fn list_forks(&self) -> Result<Vec<ForkInfo>, ClientError<T::Error>>
pub async fn list_forks(&self) -> Result<Vec<ForkInfo>, ClientError<T::Error>>
GET /agdx/forks: list the caller’s forks.
Sourcepub async fn clients(
&self,
query: &ClientsQuery,
) -> Result<ClientMetadataListView, ClientError<T::Error>>
pub async fn clients( &self, query: &ClientsQuery, ) -> Result<ClientMetadataListView, ClientError<T::Error>>
GET /agdx/clients: one page of live connections with their advertised
metadata, filtered and paginated per query. Follow next_cursor as the
next after to page.
Sourcepub async fn submit_run(
&self,
body: &AgentSubmit,
) -> Result<AgentRunInfo, ClientError<T::Error>>
pub async fn submit_run( &self, body: &AgentSubmit, ) -> Result<AgentRunInfo, ClientError<T::Error>>
POST /agdx/runs: submit a task to an agent or workflow, returning the
minted (or converged) run.
Sourcepub async fn run_status(
&self,
id: &str,
) -> Result<Option<AgentRunInfo>, ClientError<T::Error>>
pub async fn run_status( &self, id: &str, ) -> Result<Option<AgentRunInfo>, ClientError<T::Error>>
GET /agdx/runs/{id}: read one run’s status, or None on a 404.
Sourcepub async fn list_runs(
&self,
query: &RunsQuery,
) -> Result<RunPageView, ClientError<T::Error>>
pub async fn list_runs( &self, query: &RunsQuery, ) -> Result<RunPageView, ClientError<T::Error>>
GET /agdx/runs: one page of runs, filtered and paged per query.
Follow cursor as the next request’s cursor to page.
Sourcepub async fn cancel_run(
&self,
id: &str,
) -> Result<AgentRunInfo, ClientError<T::Error>>
pub async fn cancel_run( &self, id: &str, ) -> Result<AgentRunInfo, ClientError<T::Error>>
POST /agdx/runs/{id}/cancel: record the cancel intent, returning the
run (the engine observes the intent at its next step boundary).
Sourcepub async fn get_projection(
&self,
id: &str,
) -> Result<Option<ProjectionInfo>, ClientError<T::Error>>
pub async fn get_projection( &self, id: &str, ) -> Result<Option<ProjectionInfo>, ClientError<T::Error>>
GET /agdx/projections/{id}: read one projection and its bindings, or
None on a 404.
Sourcepub async fn register_projection(
&self,
projection: &Projection,
) -> Result<(), ClientError<T::Error>>
pub async fn register_projection( &self, projection: &Projection, ) -> Result<(), ClientError<T::Error>>
POST /agdx/projections: register or replace a projection (a control
command, durable on the control topic).
Sourcepub async fn drop_projection(
&self,
id: &str,
) -> Result<(), ClientError<T::Error>>
pub async fn drop_projection( &self, id: &str, ) -> Result<(), ClientError<T::Error>>
DELETE /agdx/projections/{id}: drop a projection.
Sourcepub async fn apply_binding(
&self,
binding: &ProjectionBinding,
) -> Result<(), ClientError<T::Error>>
pub async fn apply_binding( &self, binding: &ProjectionBinding, ) -> Result<(), ClientError<T::Error>>
POST /agdx/bindings: apply (add or update) a binding.
Sourcepub async fn remove_binding(
&self,
source: &SourceSelector,
projection_ref: Option<String>,
) -> Result<(), ClientError<T::Error>>
pub async fn remove_binding( &self, source: &SourceSelector, projection_ref: Option<String>, ) -> Result<(), ClientError<T::Error>>
DELETE /agdx/bindings: remove a binding for a source, or one projection
from it when projection_ref is set.
Sourcepub async fn get_schema(
&self,
id: u32,
) -> Result<Option<SchemaInfo>, ClientError<T::Error>>
pub async fn get_schema( &self, id: u32, ) -> Result<Option<SchemaInfo>, ClientError<T::Error>>
GET /agdx/schemas/{id}: read one writer schema, or None on a 404.
Sourcepub async fn drop_schema(&self, id: u32) -> Result<(), ClientError<T::Error>>
pub async fn drop_schema(&self, id: u32) -> Result<(), ClientError<T::Error>>
DELETE /agdx/schemas/{id}: drop (tombstone) a schema.
Sourcepub async fn decode_record(
&self,
id: u32,
payload: &[u8],
) -> Result<Option<Value>, ClientError<T::Error>>
pub async fn decode_record( &self, id: u32, payload: &[u8], ) -> Result<Option<Value>, ClientError<T::Error>>
POST /agdx/schemas/{id}/decode: decode a record body under the schema,
returning its JSON form, or None when the body does not decode under it.
Sourcepub async fn kv_namespaces(
&self,
) -> Result<Vec<KvNamespaceInfo>, ClientError<T::Error>>
pub async fn kv_namespaces( &self, ) -> Result<Vec<KvNamespaceInfo>, ClientError<T::Error>>
GET /agdx/kv: list the caller’s namespaces and their entry counts.
Sourcepub async fn kv_delete_many(
&self,
namespace: &str,
filter: &KvScanQuery,
) -> Result<usize, ClientError<T::Error>>
pub async fn kv_delete_many( &self, namespace: &str, filter: &KvScanQuery, ) -> Result<usize, ClientError<T::Error>>
DELETE /agdx/kv/{namespace}: bulk-delete entries matching the bounds
(no bounds clears the namespace). Returns the number removed.
Sourcepub async fn promote_fork(
&self,
id: &str,
) -> Result<usize, ClientError<T::Error>>
pub async fn promote_fork( &self, id: &str, ) -> Result<usize, ClientError<T::Error>>
POST /agdx/forks/{id}/promote: promote a fork’s rows onto the trunk.
Returns the number of rows applied.
Sourcepub async fn delete_fork(&self, id: &str) -> Result<(), ClientError<T::Error>>
pub async fn delete_fork(&self, id: &str) -> Result<(), ClientError<T::Error>>
DELETE /agdx/forks/{id}: squash (discard) a fork.
Sourcepub async fn put_fork_row(
&self,
id: &str,
body: &ForkPutBody,
) -> Result<(), ClientError<T::Error>>
pub async fn put_fork_row( &self, id: &str, body: &ForkPutBody, ) -> Result<(), ClientError<T::Error>>
PUT /agdx/forks/{id}/rows: write one speculative row into a fork.
Sourcepub async fn graph_query(
&self,
name: &str,
query: &GraphQuery,
) -> Result<GraphResultView, ClientError<T::Error>>
pub async fn graph_query( &self, name: &str, query: &GraphQuery, ) -> Result<GraphResultView, ClientError<T::Error>>
POST /agdx/graph/{name}/query: run a traversal over a named graph, get
back the reachable nodes and traversed edges. Backend-gated by the graph
capability: a deployment without a graph backend answers unsupported.
Sourcepub async fn graph_neighbors(
&self,
name: &str,
node: &str,
query: &GraphNeighborsQuery,
) -> Result<GraphResultView, ClientError<T::Error>>
pub async fn graph_neighbors( &self, name: &str, node: &str, query: &GraphNeighborsQuery, ) -> Result<GraphResultView, ClientError<T::Error>>
GET /agdx/graph/{name}/neighbors/{node}: the neighbor read, the cheap
common traversal. node is the Crockford-base32 node id. query carries
the direction, an optional edge-type filter, the hop depth, and a limit (a
default query reads one hop outward with no filter).
Sourcepub async fn list_graphs(
&self,
filter: &ProjectionListQuery,
) -> Result<Vec<ProjectionInfo>, ClientError<T::Error>>
pub async fn list_graphs( &self, filter: &ProjectionListQuery, ) -> Result<Vec<ProjectionInfo>, ClientError<T::Error>>
GET /agdx/graphs: list the registered graph projections, the discovery
surface a graph explorer reads to offer the available graphs. Reuses the
projection-list filter, narrowed to graph-kind projections server-side.
Sourcepub async fn register_graph(
&self,
projection: &Projection,
) -> Result<(), ClientError<T::Error>>
pub async fn register_graph( &self, projection: &Projection, ) -> Result<(), ClientError<T::Error>>
POST /agdx/graphs: register a graph projection (a Projection with
kind = Graph and an entity schema). Applied asynchronously, like every
control command.
Sourcepub async fn get_graph(
&self,
id: &str,
) -> Result<Option<ProjectionInfo>, ClientError<T::Error>>
pub async fn get_graph( &self, id: &str, ) -> Result<Option<ProjectionInfo>, ClientError<T::Error>>
GET /agdx/graphs/{id}: read one graph projection by id, or None when no
graph projection has it.
Sourcepub async fn drop_graph(&self, id: &str) -> Result<(), ClientError<T::Error>>
pub async fn drop_graph(&self, id: &str) -> Result<(), ClientError<T::Error>>
DELETE /agdx/graphs/{id}: drop the graph projection registered under
id. The materialized nodes and edges are left untouched.
Sourcepub async fn authz_whoami(&self) -> Result<WhoamiReply, ClientError<T::Error>>
pub async fn authz_whoami(&self) -> Result<WhoamiReply, ClientError<T::Error>>
GET /agdx/authz/whoami: the caller’s own bound roles and effective
grants. Backend-gated by the authz capability: a deployment that does
not serve the authorization band answers unsupported.
Sourcepub async fn list_roles(&self) -> Result<Vec<Role>, ClientError<T::Error>>
pub async fn list_roles(&self) -> Result<Vec<Role>, ClientError<T::Error>>
GET /agdx/authz/roles: every defined role with its full grant set.
Sourcepub async fn get_role(
&self,
name: &str,
) -> Result<Option<Role>, ClientError<T::Error>>
pub async fn get_role( &self, name: &str, ) -> Result<Option<Role>, ClientError<T::Error>>
GET /agdx/authz/roles/{name}: one role by name, or None on a 404.
Sourcepub async fn define_role(
&self,
role: &Role,
) -> Result<(), ClientError<T::Error>>
pub async fn define_role( &self, role: &Role, ) -> Result<(), ClientError<T::Error>>
PUT /agdx/authz/roles/{name}: define or replace a role. The path name is
authoritative, so role.name must match it.
Sourcepub async fn delete_role(&self, name: &str) -> Result<(), ClientError<T::Error>>
pub async fn delete_role(&self, name: &str) -> Result<(), ClientError<T::Error>>
DELETE /agdx/authz/roles/{name}: delete a role.
Sourcepub async fn user_roles(
&self,
user_id: u32,
) -> Result<Vec<String>, ClientError<T::Error>>
pub async fn user_roles( &self, user_id: u32, ) -> Result<Vec<String>, ClientError<T::Error>>
GET /agdx/authz/users/{id}/roles: one user’s bound role names.
Sourcepub async fn bind_user_roles(
&self,
user_id: u32,
roles: &[String],
) -> Result<(), ClientError<T::Error>>
pub async fn bind_user_roles( &self, user_id: u32, roles: &[String], ) -> Result<(), ClientError<T::Error>>
PUT /agdx/authz/users/{id}/roles: replace the user’s whole role set.
Trait Implementations§
Source§impl<T: Clone> Clone for HttpClient<T>
impl<T: Clone> Clone for HttpClient<T>
Source§fn clone(&self) -> HttpClient<T>
fn clone(&self) -> HttpClient<T>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<T> Freeze for HttpClient<T>where
T: Freeze,
impl<T> RefUnwindSafe for HttpClient<T>where
T: RefUnwindSafe,
impl<T> Send for HttpClient<T>where
T: Send,
impl<T> Sync for HttpClient<T>where
T: Sync,
impl<T> Unpin for HttpClient<T>where
T: Unpin,
impl<T> UnsafeUnpin for HttpClient<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for HttpClient<T>where
T: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> 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.impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
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.