#[non_exhaustive]pub struct StoreDatabase {
pub system: String,
pub namespace: Option<String>,
pub address: Option<String>,
pub port: Option<u16>,
}Expand description
The database behind a task store: what its spans and its
db.client.operation.duration measurements say they ran against
(docs/db/database-spans.md, open-telemetry/semantic-conventions@55c98cf).
Returned by TaskStore::database. Every
field is read once, when the handler is built.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.system: Stringdb.system.name (Required): one of the conventions’ well-known
values, such as postgresql or sqlite, where one applies.
namespace: Option<String>db.namespace: the database’s name, where the store knows it.
address: Option<String>server.address: the address in the store’s client configuration, a
host name, an IP address or a Unix socket path.
port: Option<u16>server.port: set only with address, and only for a port other than
the system’s default, as the conventions ask.
Implementations§
Source§impl StoreDatabase
impl StoreDatabase
Sourcepub fn new(system: impl Into<String>) -> StoreDatabase
pub fn new(system: impl Into<String>) -> StoreDatabase
A database known only by its db.system.name.
Sourcepub fn with_namespace(self, namespace: impl Into<String>) -> StoreDatabase
pub fn with_namespace(self, namespace: impl Into<String>) -> StoreDatabase
Sets db.namespace.
Sourcepub fn with_server(
self,
address: impl Into<String>,
port: Option<u16>,
) -> StoreDatabase
pub fn with_server( self, address: impl Into<String>, port: Option<u16>, ) -> StoreDatabase
Sets server.address, and server.port when port is Some.
Trait Implementations§
Source§impl Clone for StoreDatabase
impl Clone for StoreDatabase
Source§fn clone(&self) -> StoreDatabase
fn clone(&self) -> StoreDatabase
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StoreDatabase
impl Debug for StoreDatabase
impl Eq for StoreDatabase
Source§impl PartialEq for StoreDatabase
impl PartialEq for StoreDatabase
impl StructuralPartialEq for StoreDatabase
Auto Trait Implementations§
impl Forget for StoreDatabase
impl Freeze for StoreDatabase
impl Move for StoreDatabase
impl RefUnwindSafe for StoreDatabase
impl Send for StoreDatabase
impl Sync for StoreDatabase
impl Unpin for StoreDatabase
impl UnsafeUnpin for StoreDatabase
impl UnwindSafe for StoreDatabase
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§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> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
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>,
Layered].