pub struct CallMetadata { /* private fields */ }Expand description
Checked metadata applied consistently to one SDK call.
Implementations§
Source§impl CallMetadata
impl CallMetadata
Sourcepub fn authenticated(credential: BearerCredential) -> Self
pub fn authenticated(credential: BearerCredential) -> Self
Constructs metadata for an authenticated call.
Sourcepub fn with_trace_parent(self, trace_parent: TraceParent) -> Self
pub fn with_trace_parent(self, trace_parent: TraceParent) -> Self
Adds bounded trace propagation to this call.
Sourcepub fn with_database(self, database: DatabaseAlias) -> Self
pub fn with_database(self, database: DatabaseAlias) -> Self
Binds every request using this metadata to one canonical database.
Sourcepub fn with_tenant(self, tenant: TenantId) -> Self
pub fn with_tenant(self, tenant: TenantId) -> Self
Binds the local client metadata to one explicit tenant identifier so application code can pass it into tenant-keyed command and query inputs without duplicating the string literal.
Sourcepub fn with_tenant_from_env(self) -> Result<Self, MetadataError>
pub fn with_tenant_from_env(self) -> Result<Self, MetadataError>
Resolves RIFFDB_TENANT from the process environment when present and
non-empty, failing closed if the value violates TenantId bounds.
Trait Implementations§
Source§impl Clone for CallMetadata
impl Clone for CallMetadata
Source§fn clone(&self) -> CallMetadata
fn clone(&self) -> CallMetadata
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CallMetadata
impl Debug for CallMetadata
Source§impl Default for CallMetadata
impl Default for CallMetadata
Source§fn default() -> CallMetadata
fn default() -> CallMetadata
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for CallMetadata
impl RefUnwindSafe for CallMetadata
impl Send for CallMetadata
impl Sync for CallMetadata
impl Unpin for CallMetadata
impl UnsafeUnpin for CallMetadata
impl UnwindSafe for CallMetadata
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
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].