Skip to main content

Style

#[repr(i32)]
pub enum Style { Unspecified = 0, DeclarativeFriendly = 1, }
๐Ÿ‘ŽDeprecated since 0.30.0:

The opentelemetry-stackdriver crate is deprecated and will be removed from opentelemetry-rust-contrib. Migrate to OTLP (Google Cloud supports OTLP ingestion, and the OpenTelemetry Collector ships a googlecloud exporter). See https://github.com/open-telemetry/opentelemetry-rust-contrib/issues/609 for context.

Expand description

A flag representing a specific style that a resource claims to conform to.

Variantsยง

ยง

Unspecified = 0

๐Ÿ‘ŽDeprecated since 0.30.0:

The opentelemetry-stackdriver crate is deprecated and will be removed from opentelemetry-rust-contrib. Migrate to OTLP (Google Cloud supports OTLP ingestion, and the OpenTelemetry Collector ships a googlecloud exporter). See https://github.com/open-telemetry/opentelemetry-rust-contrib/issues/609 for context.

The unspecified value. Do not use.

ยง

DeclarativeFriendly = 1

๐Ÿ‘ŽDeprecated since 0.30.0:

The opentelemetry-stackdriver crate is deprecated and will be removed from opentelemetry-rust-contrib. Migrate to OTLP (Google Cloud supports OTLP ingestion, and the OpenTelemetry Collector ships a googlecloud exporter). See https://github.com/open-telemetry/opentelemetry-rust-contrib/issues/609 for context.

This resource is intended to be โ€œdeclarative-friendlyโ€.

Declarative-friendly resources must be more strictly consistent, and setting this to true communicates to tools that this resource should adhere to declarative-friendly expectations.

Note: This is used by the API linter (linter.aip.dev) to enable additional checks.

Implementationsยง

Sourceยง

impl Style

Source

pub fn is_valid(value: i32) -> bool

๐Ÿ‘ŽDeprecated since 0.30.0:

The opentelemetry-stackdriver crate is deprecated and will be removed from opentelemetry-rust-contrib. Migrate to OTLP (Google Cloud supports OTLP ingestion, and the OpenTelemetry Collector ships a googlecloud exporter). See https://github.com/open-telemetry/opentelemetry-rust-contrib/issues/609 for context.

Returns true if value is a variant of Style.

Source

pub fn from_i32(value: i32) -> Option<Style>

๐Ÿ‘ŽDeprecated:

Use the TryFrom<i32> implementation instead

Converts an i32 to a Style, or None if value is not a valid variant.

Sourceยง

impl Style

Source

pub fn as_str_name(&self) -> &'static str

๐Ÿ‘ŽDeprecated since 0.30.0:

The opentelemetry-stackdriver crate is deprecated and will be removed from opentelemetry-rust-contrib. Migrate to OTLP (Google Cloud supports OTLP ingestion, and the OpenTelemetry Collector ships a googlecloud exporter). See https://github.com/open-telemetry/opentelemetry-rust-contrib/issues/609 for context.

String value of the enum field names used in the ProtoBuf definition.

The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.

Source

pub fn from_str_name(value: &str) -> Option<Self>

๐Ÿ‘ŽDeprecated since 0.30.0:

The opentelemetry-stackdriver crate is deprecated and will be removed from opentelemetry-rust-contrib. Migrate to OTLP (Google Cloud supports OTLP ingestion, and the OpenTelemetry Collector ships a googlecloud exporter). See https://github.com/open-telemetry/opentelemetry-rust-contrib/issues/609 for context.

Creates an enum from field names used in the ProtoBuf definition.

Trait Implementationsยง

Sourceยง

impl Clone for Style

Sourceยง

fn clone(&self) -> Style

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) ยท Sourceยง

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Sourceยง

impl Copy for Style

Sourceยง

impl Debug for Style

Sourceยง

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Sourceยง

impl Default for Style

Sourceยง

fn default() -> Style

Returns the โ€œdefault valueโ€ for a type. Read more
Sourceยง

impl Eq for Style

Sourceยง

impl From<Style> for i32

Sourceยง

fn from(value: Style) -> i32

Converts to this type from the input type.
Sourceยง

impl Hash for Style

Sourceยง

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 ยท Sourceยง

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Sourceยง

impl Ord for Style

Sourceยง

fn cmp(&self, other: &Style) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) ยท Sourceยง

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) ยท Sourceยง

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) ยท Sourceยง

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Sourceยง

impl PartialEq for Style

Sourceยง

fn eq(&self, other: &Style) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) ยท Sourceยง

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Sourceยง

impl PartialOrd for Style

Sourceยง

fn partial_cmp(&self, other: &Style) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) ยท Sourceยง

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) ยท Sourceยง

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) ยท Sourceยง

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) ยท Sourceยง

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Sourceยง

impl StructuralPartialEq for Style

Sourceยง

impl TryFrom<i32> for Style

Sourceยง

type Error = UnknownEnumValue

The type returned in the event of a conversion error.
Sourceยง

fn try_from(value: i32) -> Result<Style, UnknownEnumValue>

Performs the conversion.

Auto Trait Implementationsยง

Blanket Implementationsยง

Sourceยง

impl<T> Any for T
where T: 'static + ?Sized,

Sourceยง

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Sourceยง

impl<T> Borrow<T> for T
where T: ?Sized,

Sourceยง

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Sourceยง

impl<T> BorrowMut<T> for T
where T: ?Sized,

Sourceยง

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Sourceยง

impl<T> CloneToUninit for T
where T: Clone,

Sourceยง

unsafe fn clone_to_uninit(&self, dest: *mut u8)

๐Ÿ”ฌThis is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Sourceยง

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Sourceยง

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Sourceยง

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Sourceยง

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Sourceยง

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Sourceยง

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Sourceยง

impl<T> ErasedDestructor for T
where T: 'static,

Sourceยง

impl<T> From<T> for T

Sourceยง

fn from(t: T) -> T

Returns the argument unchanged.

Sourceยง

impl<T> FutureExt for T

Sourceยง

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Sourceยง

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
Sourceยง

impl<T> Instrument for T

Sourceยง

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Sourceยง

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Sourceยง

impl<T, U> Into<U> for T
where U: From<T>,

Sourceยง

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Sourceยง

impl<T> IntoRequest<T> for T

Sourceยง

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Sourceยง

impl<L> LayerExt<L> for L

Sourceยง

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.
Sourceยง

impl<T> MaybeSendSync for T

Sourceยง

impl<T> ToOwned for T
where T: Clone,

Sourceยง

type Owned = T

The resulting type after obtaining ownership.
Sourceยง

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Sourceยง

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Sourceยง

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Sourceยง

type Error = Infallible

The type returned in the event of a conversion error.
Sourceยง

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Sourceยง

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Sourceยง

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Sourceยง

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Sourceยง

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Sourceยง

fn vzip(self) -> V

Sourceยง

impl<T> WithSubscriber for T

Sourceยง

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Sourceยง

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more