pub struct SecretRef(/* private fields */);Expand description
Reference into an environment’s secrets: secret://<env>/<path>.
The first path segment after the scheme is the env id the ref is scoped to
and must be present and non-empty (see SecretRef::env_segment). The
concrete secret material never appears in the deployment object model — it is
resolved at runtime via SecretRef::to_store_uri.
Implementations§
Source§impl SecretRef
impl SecretRef
Sourcepub fn try_new(raw: impl Into<String>) -> Result<SecretRef, SecretRefParseError>
pub fn try_new(raw: impl Into<String>) -> Result<SecretRef, SecretRefParseError>
Construct and validate a secret:// reference.
Sourcepub fn env_segment(&self) -> &str
pub fn env_segment(&self) -> &str
First path segment after the scheme — the env id the ref is scoped to.
Sourcepub fn to_store_uri(&self) -> Result<SecretUri, Error>
pub fn to_store_uri(&self) -> Result<SecretUri, Error>
Convert this deployment ref into the canonical runtime store URI
(secrets://), applying normalize_team to the team segment.
This is the single authoritative replacement for the replacen-based
secret_ref_to_store_uri helpers previously duplicated across
start/setup/deployer. It is only valid for store-aligned refs — those
whose path is exactly <env>/<tenant>/<team>/<category>/<name>. Refs
with a different shape (e.g. pack-config secret://<env>/<bundle>/<pack>/<question>)
are resolved through their own mapping and return a parse error here
rather than silently producing a wrong URI.
Sourcepub fn from_store_uri(uri: &SecretUri) -> Result<SecretRef, SecretRefParseError>
pub fn from_store_uri(uri: &SecretUri) -> Result<SecretRef, SecretRefParseError>
Build a secret:// deployment ref from a runtime store URI (the inverse
prefix flip of SecretRef::to_store_uri).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretRef
impl<'de> Deserialize<'de> for SecretRef
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SecretRef, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SecretRef, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for SecretRef
Source§impl Serialize for SecretRef
impl Serialize for SecretRef
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for SecretRef
Auto Trait Implementations§
impl Freeze for SecretRef
impl RefUnwindSafe for SecretRef
impl Send for SecretRef
impl Sync for SecretRef
impl Unpin for SecretRef
impl UnsafeUnpin for SecretRef
impl UnwindSafe for SecretRef
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request