Enum google_api_proto::google::api::expr::v1alpha1::type::WellKnownType
source · #[repr(i32)]pub enum WellKnownType {
Unspecified = 0,
Any = 1,
Timestamp = 2,
Duration = 3,
}
Expand description
Well-known protobuf types treated with first-class support in CEL.
Variants§
Unspecified = 0
Unspecified type.
Any = 1
Well-known protobuf.Any type.
Any types are a polymorphic message type. During type-checking they are
treated like DYN
types, but at runtime they are resolved to a specific
message type specified at evaluation time.
Timestamp = 2
Well-known protobuf.Timestamp type, internally referenced as timestamp
.
Duration = 3
Well-known protobuf.Duration type, internally referenced as duration
.
Implementations§
source§impl WellKnownType
impl WellKnownType
source§impl WellKnownType
impl WellKnownType
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.
sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
source§impl Clone for WellKnownType
impl Clone for WellKnownType
source§fn clone(&self) -> WellKnownType
fn clone(&self) -> WellKnownType
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for WellKnownType
impl Debug for WellKnownType
source§impl Default for WellKnownType
impl Default for WellKnownType
source§fn default() -> WellKnownType
fn default() -> WellKnownType
Returns the “default value” for a type. Read more
source§impl From<WellKnownType> for i32
impl From<WellKnownType> for i32
source§fn from(value: WellKnownType) -> i32
fn from(value: WellKnownType) -> i32
Converts to this type from the input type.
source§impl Hash for WellKnownType
impl Hash for WellKnownType
source§impl Ord for WellKnownType
impl Ord for WellKnownType
source§fn cmp(&self, other: &WellKnownType) -> Ordering
fn cmp(&self, other: &WellKnownType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for WellKnownType
impl PartialEq for WellKnownType
source§fn eq(&self, other: &WellKnownType) -> bool
fn eq(&self, other: &WellKnownType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for WellKnownType
impl PartialOrd for WellKnownType
source§fn partial_cmp(&self, other: &WellKnownType) -> Option<Ordering>
fn partial_cmp(&self, other: &WellKnownType) -> Option<Ordering>
1.0.0 · source§fn 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 moresource§impl TryFrom<i32> for WellKnownType
impl TryFrom<i32> for WellKnownType
§type Error = DecodeError
type Error = DecodeError
The type returned in the event of a conversion error.
source§fn try_from(value: i32) -> Result<WellKnownType, DecodeError>
fn try_from(value: i32) -> Result<WellKnownType, DecodeError>
Performs the conversion.
impl Copy for WellKnownType
impl Eq for WellKnownType
impl StructuralPartialEq for WellKnownType
Auto Trait Implementations§
impl Freeze for WellKnownType
impl RefUnwindSafe for WellKnownType
impl Send for WellKnownType
impl Sync for WellKnownType
impl Unpin for WellKnownType
impl UnwindSafe for WellKnownType
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
Mutably borrows from an owned value. Read more
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<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
Compare self to
key
and return true
if they are equal.§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
Checks if this value is equivalent to the given key. Read more
§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
Compare self to
key
and return true
if they are equal.§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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request