Skip to main content

HttpEnvironmentStore

Struct HttpEnvironmentStore 

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

Remote HTTP-backed implementation of EnvironmentMutations.

See the module-level doc for the route table and design rationale.

Implementations§

Source§

impl HttpEnvironmentStore

Source

pub fn new(base_url: Url, auth: AuthMethod) -> Result<Self, ConstructionError>

Build with the default reqwest::blocking::Client.

Returns ConstructionError::InsecureTransport if auth is AuthMethod::Bearer and base_url is http:// to a non-loopback host.

Source

pub fn with_client( client: Client, base_url: Url, auth: AuthMethod, ) -> Result<Self, ConstructionError>

Build with a caller-supplied client (custom timeouts, TLS config, etc.).

Returns ConstructionError::InsecureTransport if auth is AuthMethod::Bearer and base_url is http:// to a non-loopback host.

Source

pub fn create_backup( &self, env_id: &EnvId, idempotency_key: &IdempotencyKey, ) -> Result<BackupManifest, StoreError>

POST /environments/{env_id}/backups — snapshot the environment’s stored state server-side; returns the contract’s manifest.

Source

pub fn list_backups( &self, env_id: &EnvId, ) -> Result<Vec<BackupManifest>, StoreError>

GET /environments/{env_id}/backups — list backup manifests, oldest first.

Source

pub fn delete_backup( &self, env_id: &EnvId, backup_id: &str, idempotency_key: &IdempotencyKey, ) -> Result<(), StoreError>

DELETE /environments/{env_id}/backups/{backup_id} — drop one backup (the server’s per-env backup store is bounded; at the cap, create_backup refuses until old ones are deleted).

Source

pub fn restore( &self, env_id: &EnvId, request: &RestoreRequest, idempotency_key: &IdempotencyKey, ) -> Result<RestoreOutcome, StoreError>

POST /environments/{env_id}/restore — restore the environment from a named backup. request.precondition MUST pin prior state (the server answers 428 otherwise; a stale pin is a 412). The returned outcome’s integrity equals the backup’s recorded digest, and RestoreOutcome::etag is the restored state’s strong validator for the next CAS write.

Source

pub fn reconcile_environment( &self, env_id: &EnvId, idempotency_key: &IdempotencyKey, ) -> Result<Environment, StoreError>

POST /environments/{env_id}/reconcile — server-mediated reconcile authorization. Asks the control-plane store to AUTHORIZE + AUDIT + CAS-pin a reconcile and return the authorized Environment snapshot; the operator still executes the k8s apply against the live cluster (the store has no cluster access). The cached strong ETag — captured by a prior load_environment read in this invocation — is replayed as the MANDATORY If-Match, so the snapshot returned is provably the revision the operator reviewed; a concurrent advance is refused server-side with a 412 (surfaced here as StoreError::Conflict). The reconcile writes no desired state, so the returned generation/ETag echo the loaded revision unchanged.

Callers MUST load_environment first: without a cached ETag the request carries no If-Match and the server answers 428.

Source

pub fn rotate_messaging_webhook_secret_to_ref( &self, env_id: &EnvId, endpoint_id: MessagingEndpointId, updated_by: String, webhook_secret_ref: Option<String>, idempotency_key: IdempotencyKey, ) -> Result<MessagingEndpoint, StoreError>

POST /environments/{env_id}/messaging/{eid}/rotate-secret carrying an optional caller-supplied NEW webhook_secret_ref (raw secret:// URI). The control-plane store never mints secret material, so:

  • Some(ref) — the operator has already provisioned the value in its own secrets plane; the server records the asserted ref and bumps the endpoint generation.
  • None — the server cannot prove a rotation and answers 501.

The EnvironmentMutations::rotate_messaging_webhook_secret trait method delegates here with None (that generic surface carries no ref; the new-ref path is remote-store-specific and reached through the --store-url dispatch).

Source

pub fn load_trust_root_keys( &self, env_id: &EnvId, ) -> Result<Vec<TrustedKey>, StoreError>

GET /environments/{env_id}/trust-root — the env’s trusted-key set (empty for an absent row, which the server treats as closed-by-default; a missing ENV is still a 404 → StoreError::NotFound). Inherent rather than on EnvironmentReads because trust roots are a separate document with their own error type and have no LocalFsStore equivalent on that trait.

Trait Implementations§

Source§

impl Clone for HttpEnvironmentStore

Source§

fn clone(&self) -> HttpEnvironmentStore

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for HttpEnvironmentStore

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl EnvironmentMutations for HttpEnvironmentStore

Source§

fn create_environment( &self, env_id: &EnvId, name: String, host_config: EnvironmentHostConfig, ) -> Result<Environment, StoreError>

Create a fresh environment with empty bundles/revisions/packs. Rejects if the env already exists.
Source§

fn update_environment( &self, env_id: &EnvId, patch: UpdateEnvironmentPayload, ) -> Result<Environment, StoreError>

Patch the named scalar fields on an existing environment. FieldUpdate::Keep fields are skipped, FieldUpdate::Set writes the new value, FieldUpdate::Clear resets optional fields to None. The full updated Environment is returned. Covers what was previously split across update_environment (no listen_addr), set_public_url (single field), and set_config (host-level fields including listen_addr). One verb, one HTTP endpoint, one impl body per backend.
Source§

fn load_environment(&self, env_id: &EnvId) -> Result<Environment, StoreError>

Read the current environment state. This is the single READ verb on an otherwise mutation-only trait: the remote dispatch needs it to evaluate client-side preconditions — e.g. the warm health-gate’s expected_lifecycle, which the local closure-based path reads inline under its flock. Maps to GET /environments/{env_id} on the HTTP backend and delegates to EnvironmentStore::load on LocalFsStore.
Source§

fn trust_root_is_seeded(&self, env_id: &EnvId) -> Result<bool, StoreError>

True when the env’s trust root holds at least one operator key. Maps to GET /environments/{env_id}/trust-root on the HTTP backend and to a trust-root file read on LocalFsStore. A read-only probe (like Self::load_environment) — remote env apply --check uses it to diff a declared trust_root instead of assuming it is seeded (the env document does not carry trust-root state).
Source§

fn migrate_merge_bindings( &self, target_env_id: &EnvId, payload: MigrateMergePayload, ) -> Result<(Vec<String>, Vec<String>), StoreError>

Merge pack bindings and extension bindings into target_env_id. Skips slots / extension keys already bound in the target. Returns the list of newly-merged slots + extension key strings (in the form "<kind_path>::<instance_id>"). Read more
Source§

fn stage_revision( &self, env_id: &EnvId, payload: StageRevisionPayload, idempotency_key: IdempotencyKey, ) -> Result<Revision, StoreError>

Stage a fresh revision under deployment_id. The caller supplies the pinned artifact pointers; LocalFsStore’s CLI helper resolves them from a local .gtbundle upstream of this call so the trait stays storage-only. Read more
Source§

fn warm_revision( &self, env_id: &EnvId, payload: WarmRevisionPayload, idempotency_key: IdempotencyKey, ) -> Result<RevisionTransitionOutcome, StoreError>

Transition a revision through its warm lifecycle chain, applying the client-evaluated health-gate outcome. The deployer CLI runs the runner-side health checks locally and ships the result in WarmRevisionPayload::health_gate: Ok(()) advances the revision to Ready; Err(failure) flips it to Failed atomically. This replaces the closure-based gate so the operation can cross the A8 HTTP wire contract.
Source§

fn drain_revision( &self, env_id: &EnvId, revision_id: RevisionId, idempotency_key: IdempotencyKey, ) -> Result<RevisionTransitionOutcome, StoreError>

Drain a Ready revision (graceful step-down → Drained). idempotency_key is required for A8 mutation consistency even though drain is logically idempotent — the key enables audit-event replay.
Source§

fn archive_revision( &self, env_id: &EnvId, revision_id: RevisionId, idempotency_key: IdempotencyKey, ) -> Result<RevisionTransitionOutcome, StoreError>

Archive a Drained / Failed revision (terminal). idempotency_key is required for A8 mutation consistency even though archive is logically idempotent — the key enables audit-event replay.
Source§

fn add_bundle( &self, env_id: &EnvId, payload: AddBundlePayload, idempotency_key: IdempotencyKey, ) -> Result<BundleDeployment, StoreError>

idempotency_key is required for A8 §2 mutation replay; the local impl accepts and ignores, the HTTP backend caches the original outcome.
Source§

fn update_bundle( &self, env_id: &EnvId, payload: UpdateBundlePayload, idempotency_key: IdempotencyKey, ) -> Result<BundleDeployment, StoreError>

idempotency_key is required for A8 §2 mutation replay; the local impl accepts and ignores, the HTTP backend caches the original outcome.
Source§

fn remove_bundle( &self, env_id: &EnvId, deployment_id: DeploymentId, idempotency_key: IdempotencyKey, ) -> Result<RemoveBundleOutcome, StoreError>

Remove a bundle deployment from the env. Refuses if the deployment still has live traffic splits or non-archived revisions — callers must op traffic clear and archive revisions first. Read more
Source§

fn add_pack_binding( &self, env_id: &EnvId, binding: EnvPackBinding, idempotency_key: IdempotencyKey, ) -> Result<EnvPackBinding, StoreError>

Source§

fn update_pack_binding( &self, env_id: &EnvId, slot: CapabilitySlot, binding: EnvPackBinding, idempotency_key: IdempotencyKey, ) -> Result<(EnvPackBinding, u64), StoreError>

Returns (new_binding, new_generation) — the bumped audit generation is surfaced for downstream observability.
Source§

fn remove_pack_binding( &self, env_id: &EnvId, slot: CapabilitySlot, idempotency_key: IdempotencyKey, ) -> Result<(EnvPackBinding, u64), StoreError>

Source§

fn rollback_pack_binding( &self, env_id: &EnvId, slot: CapabilitySlot, idempotency_key: IdempotencyKey, ) -> Result<(EnvPackBinding, u64), StoreError>

Source§

fn add_extension_binding( &self, env_id: &EnvId, binding: ExtensionBinding, idempotency_key: IdempotencyKey, ) -> Result<ExtensionBinding, StoreError>

Source§

fn update_extension_binding( &self, env_id: &EnvId, key: ExtensionKey, binding: ExtensionBinding, idempotency_key: IdempotencyKey, ) -> Result<(ExtensionBinding, u64), StoreError>

Source§

fn remove_extension_binding( &self, env_id: &EnvId, key: ExtensionKey, idempotency_key: IdempotencyKey, ) -> Result<(ExtensionBinding, u64), StoreError>

Source§

fn rollback_extension_binding( &self, env_id: &EnvId, key: ExtensionKey, idempotency_key: IdempotencyKey, ) -> Result<(ExtensionBinding, u64), StoreError>

Source§

fn set_traffic_split( &self, env_id: &EnvId, payload: SetTrafficSplitPayload, idempotency_key: IdempotencyKey, ) -> Result<ApplyTrafficSplitOutcome, StoreError>

Source§

fn rollback_traffic_split( &self, env_id: &EnvId, deployment_id: DeploymentId, idempotency_key: IdempotencyKey, ) -> Result<RollbackTrafficSplitOutcome, StoreError>

Source§

fn add_messaging_endpoint( &self, env_id: &EnvId, payload: AddMessagingEndpointPayload, idempotency_key: IdempotencyKey, ) -> Result<MessagingEndpoint, StoreError>

idempotency_key is both A8 §2 transport metadata AND domain state in this group: the key is embedded in the endpoint’s updated_by stamp and drives same-key replay detection (see greentic_deploy_spec::engine::messaging).
Source§

fn set_messaging_welcome_flow( &self, env_id: &EnvId, payload: SetMessagingWelcomeFlowPayload, idempotency_key: IdempotencyKey, ) -> Result<MessagingEndpoint, StoreError>

idempotency_key semantics as on Self::add_messaging_endpoint — transport metadata that doubles as the replay-detection stamp.
Source§

fn remove_messaging_endpoint( &self, env_id: &EnvId, endpoint_id: MessagingEndpointId, ) -> Result<MessagingEndpointId, StoreError>

Source§

fn rotate_messaging_webhook_secret( &self, env_id: &EnvId, endpoint_id: MessagingEndpointId, updated_by: String, idempotency_key: IdempotencyKey, ) -> Result<MessagingEndpoint, StoreError>

Source§

fn bootstrap_trust_root( &self, env_id: &EnvId, ) -> Result<TrustRootSeed, StoreError>

Load (or generate) the backend’s operator signing key and add it to the env trust root. Idempotent re-grant: a second call with the same operator key is a no-op on the key set (case-insensitive key_id dedup), and it never rejects on an existing trust root.
Source§

fn seed_trust_root_if_absent( &self, env_id: &EnvId, ) -> Result<Option<TrustRootSeed>, StoreError>

Idempotent variant called from op env init: returns Some(seed) when a key was minted, None when a trust root already existed.
Source§

fn add_trusted_key( &self, env_id: &EnvId, key_id: String, public_key_pem: String, idempotency_key: IdempotencyKey, ) -> Result<TrustRootAddOutcome, StoreError>

idempotency_key is required for A8 mutation consistency even though add_trusted_key is intrinsically idempotent on key_id collision — the key enables HTTP-backend audit-event replay. Local-FS impls accept and ignore it; HTTP impls cache it for replay.
Source§

fn remove_trusted_key( &self, env_id: &EnvId, key_id: String, idempotency_key: IdempotencyKey, ) -> Result<TrustRootRemoveOutcome, StoreError>

idempotency_key is required for A8 mutation consistency. remove is logically idempotent on the trust-root state, but the wire-shape removed_public_key_pem field would be null on retry (the original PEM is gone) — so a retry without replay loses recovery material AND audit fidelity. The key enables HTTP-backend replay of the original response/audit; local-FS impls accept and ignore it.
Source§

impl EnvironmentReads for HttpEnvironmentStore

Source§

fn list_env_ids(&self) -> Result<Vec<EnvId>, StoreError>

GET /environments → the sorted env-id set (RBAC read-scope filtering is applied server-side).

Source§

fn env_exists(&self, env_id: &EnvId) -> Result<bool, StoreError>

A GET of the env mapped to a boolean: 200 → present, 404 → absent.

Source§

fn load_env(&self, env_id: &EnvId) -> Result<Environment, StoreError>

The environment document. Delegates to the mutation-side read EnvironmentMutations::load_environment (GET /environments/{env_id}) so the env GET shape lives in one place; the read verbs only project the returned document.

Source§

fn read_runtime( &self, env_id: &EnvId, ) -> Result<Option<EnvironmentRuntime>, StoreError>

GET /environments/{env_id}/runtime → the runtime host-config sidecar (null when none has been written) so remote env show reports the real runtime instead of conflating “absent” with “not exposed”.

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<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

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<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<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> 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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ServiceExt for T

Source§

fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>
where Self: Sized,

Apply a transformation to the response body. Read more
Source§

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

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,

High level tracing that classifies responses using gRPC headers. Read more
Source§

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

Follow redirect resposes using the Standard policy. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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