#[repr(i32)]pub enum Capability {
Unspecified = 0,
Capabilities = 1,
RequiredResources = 2,
Credentials = 3,
Conditions = 4,
RequiredSchemas = 5,
}Expand description
Capability indicates that Crossplane supports a particular feature. Functions can check for capabilities to determine whether Crossplane will honor a particular request or response field.
Variants§
Unspecified = 0
Capabilities = 1
Crossplane sends capabilities in RequestMeta. If this capability is present, the function knows that if another capability is absent, it’s because Crossplane doesn’t support it (not because Crossplane predates capability advertisement). Added in Crossplane v2.2.
RequiredResources = 2
Crossplane supports the requirements.resources field. Functions can return resource requirements and Crossplane will fetch the requested resources and return them in required_resources. Added in Crossplane v1.15.
Credentials = 3
Crossplane supports the credentials field. Functions can receive credentials from secrets specified in the Composition. Added in Crossplane v1.16.
Conditions = 4
Crossplane supports the conditions field. Functions can return status conditions to be applied to the XR and optionally its claim. Added in Crossplane v1.17.
RequiredSchemas = 5
Crossplane supports the requirements.schemas field. Functions can request OpenAPI schemas and Crossplane will return them in required_schemas. Added in Crossplane v2.2.
Implementations§
Source§impl Capability
impl Capability
Source§impl Capability
impl Capability
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 Capability
impl Clone for Capability
impl Copy for Capability
Source§impl Debug for Capability
impl Debug for Capability
Source§impl Default for Capability
impl Default for Capability
Source§fn default() -> Capability
fn default() -> Capability
§impl<'de> Deserialize<'de> for Capability
impl<'de> Deserialize<'de> for Capability
§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
impl Eq for Capability
Source§impl From<Capability> for i32
impl From<Capability> for i32
Source§fn from(value: Capability) -> i32
fn from(value: Capability) -> i32
Source§impl Hash for Capability
impl Hash for Capability
Source§impl Ord for Capability
impl Ord for Capability
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for Capability
impl PartialEq for Capability
Source§impl PartialOrd for Capability
impl PartialOrd for Capability
§impl Serialize for Capability
impl Serialize for Capability
impl StructuralPartialEq for Capability
Source§impl TryFrom<i32> for Capability
impl TryFrom<i32> for Capability
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
Source§fn try_from(value: i32) -> Result<Capability, UnknownEnumValue>
fn try_from(value: i32) -> Result<Capability, UnknownEnumValue>
Auto Trait Implementations§
impl Freeze for Capability
impl RefUnwindSafe for Capability
impl Send for Capability
impl Sync for Capability
impl Unpin for Capability
impl UnsafeUnpin for Capability
impl UnwindSafe for Capability
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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>
T in a tonic::Request