pub struct CapturedCredential {
pub id: CredentialId,
pub value: Value,
pub metadata: CredentialMetadata,
}Expand description
The shape of a credential captured into the dispatch-side sidecar.
value holds the JSON-encoded inner credential payload; metadata rides
alongside; id is the stable per-credential identifier matching the
{"$credential": "<id>"} sentinel emitted inline in the body. Only
emitted into the sidecar when the dispatch capture toggle is active;
otherwise the credential’s Serialize impl emits only the sentinel.
The id field carries the same CredentialId that the sidecar’s
internal HashMap uses as its key. It is duplicated onto the
CapturedCredential itself so the public scoped-callback API
(run_with_credential_capture) can return a Vec<CapturedCredential>
that is self-describing — callers do not need to track the id
separately.
Fields§
§id: CredentialIdStable per-credential id matching the {"$credential": "<id>"}
sentinel emitted inline.
value: ValueJSON-encoded inner value. Stored as serde_json::Value so the
dispatch wrapper can re-emit it in the envelope without re-serializing
the typed value through a second pass.
metadata: CredentialMetadataThe metadata as fixed at mint time.
Trait Implementations§
Source§impl Clone for CapturedCredential
impl Clone for CapturedCredential
Source§fn clone(&self) -> CapturedCredential
fn clone(&self) -> CapturedCredential
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more