pub struct Variable {
pub expression: String,
pub name: String,
}
Expand description
Variable is the definition of a variable that is used for composition. A variable is defined as a named expression.
Fields§
§expression: String
Expression is the expression that will be evaluated as the value of the variable. The CEL expression has access to the same identifiers as the CEL expressions in Validation.
name: String
Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through variables
For example, if name is “foo”, the variable will be available as variables.foo
Trait Implementations§
Source§impl DeepMerge for Variable
impl DeepMerge for Variable
Source§fn merge_from(&mut self, other: Self)
fn merge_from(&mut self, other: Self)
Merge
other
into self
.Source§impl<'de> Deserialize<'de> for Variable
impl<'de> Deserialize<'de> for Variable
Source§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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for Variable
impl JsonSchema for Variable
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn json_schema(__gen: &mut SchemaGenerator) -> Schema
fn json_schema(__gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moreimpl StructuralPartialEq for Variable
Auto Trait Implementations§
impl Freeze for Variable
impl RefUnwindSafe for Variable
impl Send for Variable
impl Sync for Variable
impl Unpin for Variable
impl UnwindSafe for Variable
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