Enum opentelemetry_stackdriver::proto::api::FieldBehavior
source · [−]#[repr(i32)]
pub enum FieldBehavior {
Unspecified,
Optional,
Required,
OutputOnly,
InputOnly,
Immutable,
UnorderedList,
NonEmptyDefault,
}Expand description
An indicator of the behavior of a given field (for example, that a field is required in requests, or given as output but ignored as input). This does not change the behavior in protocol buffers itself; it only denotes the behavior and may affect how API tooling handles the field.
Note: This enum may receive new values in the future.
Variants
Unspecified
Conventional default for enums. Do not use this.
Optional
Specifically denotes a field as optional. While all fields in protocol buffers are optional, this may be specified for emphasis if appropriate.
Required
Denotes a field as required.
This indicates that the field must be provided as part of the request,
and failure to do so will cause an error (usually INVALID_ARGUMENT).
OutputOnly
Denotes a field as output only. This indicates that the field is provided in responses, but including the field in a request does nothing (the server must ignore it and must not throw an error as a result of the field’s presence).
InputOnly
Denotes a field as input only. This indicates that the field is provided in requests, and the corresponding field is not included in output.
Immutable
Denotes a field as immutable. This indicates that the field may be set once in a request to create a resource, but may not be changed thereafter.
UnorderedList
Denotes that a (repeated) field is an unordered list. This indicates that the service may provide the elements of the list in any arbitrary order, rather than the order the user originally provided. Additionally, the list’s order may or may not be stable.
NonEmptyDefault
Denotes that this field returns a non-empty default value if not set. This indicates that if the user provides the empty value in a request, a non-empty value will be returned. The user will not be aware of what non-empty value to expect.
Implementations
sourceimpl FieldBehavior
impl FieldBehavior
sourceimpl FieldBehavior
impl FieldBehavior
sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
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.
Trait Implementations
sourceimpl Clone for FieldBehavior
impl Clone for FieldBehavior
sourcefn clone(&self) -> FieldBehavior
fn clone(&self) -> FieldBehavior
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 FieldBehavior
impl Debug for FieldBehavior
sourceimpl Default for FieldBehavior
impl Default for FieldBehavior
sourcefn default() -> FieldBehavior
fn default() -> FieldBehavior
Returns the “default value” for a type. Read more
sourceimpl From<FieldBehavior> for i32
impl From<FieldBehavior> for i32
sourcefn from(value: FieldBehavior) -> i32
fn from(value: FieldBehavior) -> i32
Converts to this type from the input type.
sourceimpl Hash for FieldBehavior
impl Hash for FieldBehavior
sourceimpl Ord for FieldBehavior
impl Ord for FieldBehavior
sourcefn cmp(&self, other: &FieldBehavior) -> Ordering
fn cmp(&self, other: &FieldBehavior) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<FieldBehavior> for FieldBehavior
impl PartialEq<FieldBehavior> for FieldBehavior
sourcefn eq(&self, other: &FieldBehavior) -> bool
fn eq(&self, other: &FieldBehavior) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourceimpl PartialOrd<FieldBehavior> for FieldBehavior
impl PartialOrd<FieldBehavior> for FieldBehavior
sourcefn partial_cmp(&self, other: &FieldBehavior) -> Option<Ordering>
fn partial_cmp(&self, other: &FieldBehavior) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl Copy for FieldBehavior
impl Eq for FieldBehavior
impl StructuralEq for FieldBehavior
impl StructuralPartialEq for FieldBehavior
Auto Trait Implementations
impl RefUnwindSafe for FieldBehavior
impl Send for FieldBehavior
impl Sync for FieldBehavior
impl Unpin for FieldBehavior
impl UnwindSafe for FieldBehavior
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.
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>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message T in a tonic::Request
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more