#[non_exhaustive]pub struct ClientInfo {
pub application_name: Option<String>,
pub application_version: Option<String>,
pub integration_name: Option<String>,
pub integration_version: Option<String>,
}Expand description
Identity of the integrating application, declared on the server.connect
handshake.
Declaring it lets the telemetry the runtime emits on the connection be attributed to a single, consistent surface instead of the runtime’s own build. All fields are optional; an empty field is omitted from the handshake.
The struct is #[non_exhaustive], so construct it with ClientInfo::new
and the with_* builder methods rather than a struct literal. This lets the
SDK add identity fields in future releases without a breaking change.
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.application_name: Option<String>Name of the application using the SDK.
application_version: Option<String>Version of the application using the SDK.
integration_name: Option<String>Optional name of a specific integration within the application, such as an extension or plugin.
integration_version: Option<String>Optional version of the integration identified by Self::integration_name.
Implementations§
Source§impl ClientInfo
impl ClientInfo
Sourcepub fn new() -> Self
pub fn new() -> Self
Create an empty ClientInfo. Populate fields with the with_* builder
methods; every field is optional.
Sourcepub fn with_application_name(self, application_name: impl Into<String>) -> Self
pub fn with_application_name(self, application_name: impl Into<String>) -> Self
Set the name of the application using the SDK.
Sourcepub fn with_application_version(
self,
application_version: impl Into<String>,
) -> Self
pub fn with_application_version( self, application_version: impl Into<String>, ) -> Self
Set the version of the application using the SDK.
Sourcepub fn with_integration_name(self, integration_name: impl Into<String>) -> Self
pub fn with_integration_name(self, integration_name: impl Into<String>) -> Self
Set the name of a specific integration within the application, such as an extension or plugin.
Sourcepub fn with_integration_version(
self,
integration_version: impl Into<String>,
) -> Self
pub fn with_integration_version( self, integration_version: impl Into<String>, ) -> Self
Set the version of the integration identified by
Self::with_integration_name.
Trait Implementations§
Source§impl Clone for ClientInfo
impl Clone for ClientInfo
Source§fn clone(&self) -> ClientInfo
fn clone(&self) -> ClientInfo
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 ClientInfo
impl Debug for ClientInfo
Source§impl Default for ClientInfo
impl Default for ClientInfo
Source§fn default() -> ClientInfo
fn default() -> ClientInfo
impl Eq for ClientInfo
Source§impl PartialEq for ClientInfo
impl PartialEq for ClientInfo
impl StructuralPartialEq for ClientInfo
Auto Trait Implementations§
impl Freeze for ClientInfo
impl RefUnwindSafe for ClientInfo
impl Send for ClientInfo
impl Sync for ClientInfo
impl Unpin for ClientInfo
impl UnsafeUnpin for ClientInfo
impl UnwindSafe for ClientInfo
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.