Struct opentelemetry::sdk::InstrumentationLibrary
source · [−]#[non_exhaustive]pub struct InstrumentationLibrary {
pub name: Cow<'static, str>,
pub version: Option<Cow<'static, str>>,
pub schema_url: Option<Cow<'static, str>>,
}
Expand description
Information about a library or crate providing instrumentation.
An instrumentation library should be named to follow any naming conventions of the instrumented library (e.g. ‘middleware’ for a web framework).
See the instrumentation libraries spec for more information.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.name: Cow<'static, str>
The library name.
This should be the name of the crate providing the instrumentation.
version: Option<Cow<'static, str>>
The library version.
Examples
let library = opentelemetry_api::InstrumentationLibrary::new(
"my-crate",
Some(env!("CARGO_PKG_VERSION")),
None,
);
schema_url: Option<Cow<'static, str>>
Schema url used by this library.
Implementations
Trait Implementations
sourceimpl Clone for InstrumentationLibrary
impl Clone for InstrumentationLibrary
sourcefn clone(&self) -> InstrumentationLibrary
fn clone(&self) -> InstrumentationLibrary
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for InstrumentationLibrary
impl Debug for InstrumentationLibrary
sourceimpl Default for InstrumentationLibrary
impl Default for InstrumentationLibrary
sourcefn default() -> InstrumentationLibrary
fn default() -> InstrumentationLibrary
Returns the “default value” for a type. Read more
sourceimpl Hash for InstrumentationLibrary
impl Hash for InstrumentationLibrary
sourceimpl PartialEq<InstrumentationLibrary> for InstrumentationLibrary
impl PartialEq<InstrumentationLibrary> for InstrumentationLibrary
sourcefn eq(&self, other: &InstrumentationLibrary) -> bool
fn eq(&self, other: &InstrumentationLibrary) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
impl Eq for InstrumentationLibrary
impl StructuralEq for InstrumentationLibrary
impl StructuralPartialEq for InstrumentationLibrary
Auto Trait Implementations
impl RefUnwindSafe for InstrumentationLibrary
impl Send for InstrumentationLibrary
impl Sync for InstrumentationLibrary
impl Unpin for InstrumentationLibrary
impl UnwindSafe for InstrumentationLibrary
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.