Skip to main content

PostgresHistory

Struct PostgresHistory 

Source
pub struct PostgresHistory { /* private fields */ }
Available on crate features serve-history-postgres and serve only.
Expand description

SQL-backed RunHistory. See crate::serve::history::sql for the shared schema + semantics.

Implementations§

Source§

impl PostgresHistory

Source

pub fn from_parts( pool: PgPool, idem_retention: Duration, lease_ttl: Duration, instance_id: String, stmts: Stmts, ) -> Self

Assemble from an already-connected pool (used by connect).

Source

pub fn pool(&self) -> &PgPool

Borrow the underlying pool (tests close it to exercise fallback).

Source§

impl PostgresHistory

Source

pub async fn connect( url: &str, idem_retention: Duration, lease_ttl: Duration, instance_id: String, ) -> Result<Self, HistoryError>

Connect, create the schema if absent, and return the backend. lease_ttl and instance_id drive instance-fenced orphan recovery (#146 H7).

Trait Implementations§

Source§

impl RunHistory for PostgresHistory

Source§

fn claim_idempotency<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, key: &'life1 str, fingerprint: &'life2 str, run_id: &'life3 str, window: Duration, ) -> Pin<Box<dyn Future<Output = Result<Claim, HistoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Atomically claim key for run_id (or report a replay/conflict). A prior claim older than window is treated as expired and re-claimable.
Source§

fn upsert<'life0, 'life1, 'async_trait>( &'life0 self, rec: &'life1 RunRecord, ) -> Pin<Box<dyn Future<Output = Result<(), HistoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Insert or replace a run record.
Source§

fn get<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<RunRecord>, HistoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn list<'life0, 'life1, 'async_trait>( &'life0 self, filter: &'life1 ListFilter, ) -> Pin<Box<dyn Future<Output = Result<ListPage, HistoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn delete<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<DeleteOutcome, HistoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Delete a terminal run. Non-terminal → StillRunning (caller maps to 409).
Source§

fn release_idempotency<'life0, 'life1, 'async_trait>( &'life0 self, run_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), HistoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Release the idempotency claim(s) pointing at run_id. Called on the submit path when the run-record write that should immediately follow a Fresh claim fails — without it, a fallible (SQL) backend would orphan the claim, so every replay of the key 404s until the claim self-expires within the retention window (F21). Scoped by run_id, so a newer run that re-claimed the same key keeps its claim. Best-effort. Default: no-op — the in-memory backend’s upsert is infallible, so a Fresh claim is always paired with a record.
Source§

fn purge_expired<'life0, 'async_trait>( &'life0 self, retain_for: Duration, ) -> Pin<Box<dyn Future<Output = Result<usize, HistoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Drop terminal records finished longer than retain_for ago. Returns the number removed.
Source§

fn recover_orphans<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<usize, HistoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Mark non-terminal records whose owning instance’s lease has expired as failed (instance-fenced orphan recovery — never touches a live peer’s heartbeated runs, #146 H7). Returns the number recovered. The memory backend has nothing to recover (returns 0).
Source§

fn renew_leases<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<usize, HistoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Heartbeat: extend the lease of this instance’s own non-terminal runs so a peer’s recover_orphans won’t reclaim them. Returns the number of leases renewed. The memory backend (single-process, unshared) is a no-op returning 0.
Source§

fn claim_pending<'life0, 'async_trait>( &'life0 self, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<RunRecord>, HistoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Atomically claim up to limit oldest Pending runs for this instance, moving them PendingRunning with a fresh lease, and return the claimed records (with config_body) for the caller to execute. Exclusive: a run claimed by one caller is never returned to another. Default: none (memory is single-process and never writes Pending).
Source§

fn reclaim_orphans<'life0, 'async_trait>( &'life0 self, max_attempts: u32, ) -> Pin<Box<dyn Future<Output = Result<ReclaimReport, HistoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Cluster failover: expired-lease Running runs whose attempt < max_attempts go back to Pending (owner/lease cleared, attempt++); the rest are Failed (poison). Returns the counts. Default: nothing to reclaim.
Source§

fn finalize_owned<'life0, 'life1, 'async_trait>( &'life0 self, rec: &'life1 RunRecord, ) -> Pin<Box<dyn Future<Output = Result<bool, HistoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Owner-fenced terminal write: persist rec only if this instance still owns the run. Returns true if the write landed, false if another instance reclaimed it (the caller should discard its result). Default: delegate to upsert (memory/single-process always owns its runs).
Source§

fn finalize_sharded_parent<'life0, 'life1, 'async_trait>( &'life0 self, run_id: &'life1 str, status: RunStatus, finished_at: DateTime<Utc>, error: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<bool, HistoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Status-fenced finalize of a Sharded parent run: set the terminal status / finished_at / error only while the run is still Sharded, and — crucially — WITHOUT re-stamping owner / lease_expires_at. A terminal record must not re-arm a lease, and two shards finishing on two instances at once must not last-writer-wins overwrite each other via the owner-stamping upsert (F45). Returns true if this call performed the transition (the first finalizer wins; a concurrent second call is a no-op). Default: read-guard-write via upsert — correct for the single-process in-memory backend, which has no cross-instance race and no lease columns. The SQL backends override this with one conditional UPDATE.
Source§

fn cancel_pending<'life0, 'life1, 'async_trait>( &'life0 self, run_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<bool, HistoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Cancel a still-Pending (unclaimed) run directly. Returns true if it was pending and is now Cancelled; false if it had already been claimed (the caller should fall back to request_cancel). Default: false.
Source§

fn request_cancel<'life0, 'life1, 'async_trait>( &'life0 self, run_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), HistoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Flag a Running run for cross-instance cancellation; its owning instance fires the local cancel on its next claim-loop tick. Default: no-op.
Source§

fn pending_cancellations<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, HistoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

This instance’s own Running runs that have a pending cancel request. Default: none.
Source§

fn heartbeat_instance<'life0, 'life1, 'async_trait>( &'life0 self, beat: &'life1 InstanceHeartbeat, ) -> Pin<Box<dyn Future<Output = Result<(), HistoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Membership heartbeat: upsert this instance’s liveness row. Default: no-op.
Source§

fn live_instances<'life0, 'async_trait>( &'life0 self, ttl: Duration, ) -> Pin<Box<dyn Future<Output = Result<Vec<InstanceRecord>, HistoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Live cluster members (last heartbeat within ttl). Default: none.
Source§

fn insert_shards<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, run_id: &'life1 str, shards: &'life2 [ShardInsert], ) -> Pin<Box<dyn Future<Output = Result<usize, HistoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Idempotently insert the shard set for run_id (INSERT … ON CONFLICT (run_id, shard_id) DO NOTHING), so concurrent coordinators converge on the same set without a leader. Returns the number of rows newly inserted. Default: no-op.
Source§

fn claim_shards<'life0, 'async_trait>( &'life0 self, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<ClaimedShard>, HistoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Atomically claim up to limit pending shards for this instance (pendingrunning with a fresh lease), largest-estimated-size first for skew-aware balancing, returning each with its parent run record. Exclusive, like claim_pending. Default: none.
Source§

fn renew_shard_leases<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<usize, HistoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Heartbeat: extend the lease of this instance’s own running shards so a peer’s reclaim_shards won’t reassign them. Returns the number renewed. Default: no-op.
Source§

fn reclaim_shards<'life0, 'async_trait>( &'life0 self, max_attempts: u32, ) -> Pin<Box<dyn Future<Output = Result<ReclaimReport, HistoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Rebalance: expired-lease running shards whose attempt < max_attempts go back to pending (owner cleared, attempt++) for another worker to claim; the rest are failed (poison). Returns the counts. Default: none.
Source§

fn finalize_shard<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, run_id: &'life1 str, shard_id: &'life2 str, success: bool, ) -> Pin<Box<dyn Future<Output = Result<bool, HistoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Owner-fenced terminal write for one shard (runningcompleted/failed), only if this instance still owns it. Returns true if the write landed. Default: false.
Source§

fn shard_progress<'life0, 'life1, 'async_trait>( &'life0 self, run_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<ShardProgress, HistoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Aggregate shard status counts for a run (drives parent-run finalization). Default: empty.
Source§

fn pending_shard_cancellations<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, HistoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Distinct run_ids for which THIS instance owns a running shard whose parent run has a pending cancellation request (F10). The claim loop fires each returned run’s local shard tokens via Registry::cancel_run_shards. Default: none (single-process / memory owns no cross-instance shards).
Source§

fn finalize_completed_sharded_parents<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<usize, HistoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Sweep sharded parent runs whose shards are ALL terminal and finalize each to Completed (no failures) or Failed, stamping finished_at (F11). Recovers a parent that no shard task finalized inline (e.g. the coordinator crashed after the last shard completed elsewhere). Returns the number finalized. Status-fenced, so a concurrent inline finalize is a benign no-op and the run-finished metric is never double-counted. Default: nothing to finalize.
Source§

fn degraded(&self) -> bool

True when the backend is in fallback mode (drives /readyz). Always false for memory.

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<U> As for U

Source§

fn as_<T>(self) -> T
where T: CastFrom<U>, U: Sized,

Casts self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more
Source§

impl<T> AsAny for T
where T: Any,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

fn type_name(&self) -> &'static str

Gets the type name of self
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> Conv for T

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<T> Downcast for T
where T: AsAny + ?Sized,

Source§

fn is<T>(&self) -> bool
where T: AsAny,

Returns true if the boxed type is the same as T. Read more
Source§

fn downcast_ref<T>(&self) -> Option<&T>
where T: AsAny,

Forward to the method defined on the type Any.
Source§

fn downcast_mut<T>(&mut self) -> Option<&mut T>
where T: AsAny,

Forward to the method defined on the type Any.
Source§

impl<T> FmtForward for T

Source§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
Source§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
Source§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
Source§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
Source§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
Source§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
Source§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
Source§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
Source§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FutureExt for T

Source§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Source§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

Source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

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

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
Source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
Source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows 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
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows 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
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ServiceExt for T

Source§

fn decompression(self) -> Decompression<Self>
where Self: Sized,

Available on crate features decompression-br or decompression-deflate or decompression-gzip or decompression-zstd only.
Decompress response bodies. Read more
Source§

fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>
where Self: Sized,

Available on crate feature trace only.
High level tracing that classifies responses using HTTP status codes. Read more
Source§

fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>
where Self: Sized,

Available on crate feature trace only.
High level tracing that classifies responses using gRPC headers. Read more
Source§

fn follow_redirects(self) -> FollowRedirect<Self>
where Self: Sized,

Available on crate feature follow-redirect only.
Follow redirect resposes using the Standard policy. Read more
Source§

fn set_request_id<M>( self, header_name: HeaderName, make_request_id: M, ) -> SetRequestId<Self, M>
where Self: Sized, M: MakeRequestId,

Available on crate feature request-id only.
Add request id header and extension. Read more
Source§

fn set_x_request_id<M>(self, make_request_id: M) -> SetRequestId<Self, M>
where Self: Sized, M: MakeRequestId,

Available on crate feature request-id only.
Add request id header and extension, using x-request-id as the header name. Read more
Source§

fn propagate_request_id( self, header_name: HeaderName, ) -> PropagateRequestId<Self>
where Self: Sized,

Available on crate feature request-id only.
Propgate request ids from requests to responses. Read more
Source§

fn propagate_x_request_id(self) -> PropagateRequestId<Self>
where Self: Sized,

Available on crate feature request-id only.
Propgate request ids from requests to responses, using x-request-id as the header name. Read more
Source§

fn request_body_limit(self, limit: usize) -> RequestBodyLimit<Self>
where Self: Sized,

Available on crate feature limit only.
Intercept requests with over-sized payloads and convert them into 413 Payload Too Large responses. Read more
Source§

impl<T> Tap for T

Source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
Source§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
Source§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
Source§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
Source§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
Source§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
Source§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
Source§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
Source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .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
where Self: BorrowMut<B>, B: ?Sized,

Calls .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
where Self: AsRef<R>, R: ?Sized,

Calls .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
where Self: AsMut<R>, R: ?Sized,

Calls .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
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

impl<T> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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