Expr

Enum Expr 

Source
pub enum Expr {
Show 39 variants Let { variable_id: VariableId, type_annotation: Option<TypeName>, expr: Box<Expr>, inferred_type: InferredType, source_span: SourceSpan, }, SelectField { expr: Box<Expr>, field: String, type_annotation: Option<TypeName>, inferred_type: InferredType, source_span: SourceSpan, }, SelectIndex { expr: Box<Expr>, index: Box<Expr>, type_annotation: Option<TypeName>, inferred_type: InferredType, source_span: SourceSpan, }, Sequence { exprs: Vec<Expr>, type_annotation: Option<TypeName>, inferred_type: InferredType, source_span: SourceSpan, }, Range { range: Range, type_annotation: Option<TypeName>, inferred_type: InferredType, source_span: SourceSpan, }, Record { exprs: Vec<(String, Box<Expr>)>, type_annotation: Option<TypeName>, inferred_type: InferredType, source_span: SourceSpan, }, Tuple { exprs: Vec<Expr>, type_annotation: Option<TypeName>, inferred_type: InferredType, source_span: SourceSpan, }, Literal { value: String, type_annotation: Option<TypeName>, inferred_type: InferredType, source_span: SourceSpan, }, Number { number: Number, type_annotation: Option<TypeName>, inferred_type: InferredType, source_span: SourceSpan, }, Flags { flags: Vec<String>, type_annotation: Option<TypeName>, inferred_type: InferredType, source_span: SourceSpan, }, Identifier { variable_id: VariableId, type_annotation: Option<TypeName>, inferred_type: InferredType, source_span: SourceSpan, }, Boolean { value: bool, type_annotation: Option<TypeName>, inferred_type: InferredType, source_span: SourceSpan, }, Concat { exprs: Vec<Expr>, type_annotation: Option<TypeName>, inferred_type: InferredType, source_span: SourceSpan, }, ExprBlock { exprs: Vec<Expr>, type_annotation: Option<TypeName>, inferred_type: InferredType, source_span: SourceSpan, }, Not { expr: Box<Expr>, inferred_type: InferredType, type_annotation: Option<TypeName>, source_span: SourceSpan, }, GreaterThan { lhs: Box<Expr>, rhs: Box<Expr>, type_annotation: Option<TypeName>, inferred_type: InferredType, source_span: SourceSpan, }, And { lhs: Box<Expr>, rhs: Box<Expr>, type_annotation: Option<TypeName>, inferred_type: InferredType, source_span: SourceSpan, }, Or { lhs: Box<Expr>, rhs: Box<Expr>, type_annotation: Option<TypeName>, inferred_type: InferredType, source_span: SourceSpan, }, GreaterThanOrEqualTo { lhs: Box<Expr>, rhs: Box<Expr>, type_annotation: Option<TypeName>, inferred_type: InferredType, source_span: SourceSpan, }, LessThanOrEqualTo { lhs: Box<Expr>, rhs: Box<Expr>, type_annotation: Option<TypeName>, inferred_type: InferredType, source_span: SourceSpan, }, Plus { lhs: Box<Expr>, rhs: Box<Expr>, type_annotation: Option<TypeName>, inferred_type: InferredType, source_span: SourceSpan, }, Multiply { lhs: Box<Expr>, rhs: Box<Expr>, type_annotation: Option<TypeName>, inferred_type: InferredType, source_span: SourceSpan, }, Minus { lhs: Box<Expr>, rhs: Box<Expr>, type_annotation: Option<TypeName>, inferred_type: InferredType, source_span: SourceSpan, }, Divide { lhs: Box<Expr>, rhs: Box<Expr>, type_annotation: Option<TypeName>, inferred_type: InferredType, source_span: SourceSpan, }, EqualTo { lhs: Box<Expr>, rhs: Box<Expr>, type_annotation: Option<TypeName>, inferred_type: InferredType, source_span: SourceSpan, }, LessThan { lhs: Box<Expr>, rhs: Box<Expr>, type_annotation: Option<TypeName>, inferred_type: InferredType, source_span: SourceSpan, }, Cond { cond: Box<Expr>, lhs: Box<Expr>, rhs: Box<Expr>, type_annotation: Option<TypeName>, inferred_type: InferredType, source_span: SourceSpan, }, PatternMatch { predicate: Box<Expr>, match_arms: Vec<MatchArm>, type_annotation: Option<TypeName>, inferred_type: InferredType, source_span: SourceSpan, }, Option { expr: Option<Box<Expr>>, type_annotation: Option<TypeName>, inferred_type: InferredType, source_span: SourceSpan, }, Result { expr: Result<Box<Expr>, Box<Expr>>, type_annotation: Option<TypeName>, inferred_type: InferredType, source_span: SourceSpan, }, Call { call_type: CallType, generic_type_parameter: Option<GenericTypeParameter>, args: Vec<Expr>, type_annotation: Option<TypeName>, inferred_type: InferredType, source_span: SourceSpan, }, InvokeMethodLazy { lhs: Box<Expr>, method: String, generic_type_parameter: Option<GenericTypeParameter>, args: Vec<Expr>, type_annotation: Option<TypeName>, inferred_type: InferredType, source_span: SourceSpan, }, Unwrap { expr: Box<Expr>, inferred_type: InferredType, type_annotation: Option<TypeName>, source_span: SourceSpan, }, Throw { message: String, inferred_type: InferredType, type_annotation: Option<TypeName>, source_span: SourceSpan, }, GetTag { expr: Box<Expr>, inferred_type: InferredType, type_annotation: Option<TypeName>, source_span: SourceSpan, }, ListComprehension { iterated_variable: VariableId, iterable_expr: Box<Expr>, yield_expr: Box<Expr>, type_annotation: Option<TypeName>, inferred_type: InferredType, source_span: SourceSpan, }, ListReduce { reduce_variable: VariableId, iterated_variable: VariableId, iterable_expr: Box<Expr>, type_annotation: Option<TypeName>, yield_expr: Box<Expr>, init_value_expr: Box<Expr>, inferred_type: InferredType, source_span: SourceSpan, }, Length { expr: Box<Expr>, inferred_type: InferredType, type_annotation: Option<TypeName>, source_span: SourceSpan, }, GenerateWorkerName { inferred_type: InferredType, type_annotation: Option<TypeName>, source_span: SourceSpan, variable_id: Option<VariableId>, },
}

Variants§

§

Let

Fields

§variable_id: VariableId
§type_annotation: Option<TypeName>
§expr: Box<Expr>
§inferred_type: InferredType
§source_span: SourceSpan
§

SelectField

Fields

§expr: Box<Expr>
§field: String
§type_annotation: Option<TypeName>
§inferred_type: InferredType
§source_span: SourceSpan
§

SelectIndex

Fields

§expr: Box<Expr>
§index: Box<Expr>
§type_annotation: Option<TypeName>
§inferred_type: InferredType
§source_span: SourceSpan
§

Sequence

Fields

§exprs: Vec<Expr>
§type_annotation: Option<TypeName>
§inferred_type: InferredType
§source_span: SourceSpan
§

Range

Fields

§range: Range
§type_annotation: Option<TypeName>
§inferred_type: InferredType
§source_span: SourceSpan
§

Record

Fields

§exprs: Vec<(String, Box<Expr>)>
§type_annotation: Option<TypeName>
§inferred_type: InferredType
§source_span: SourceSpan
§

Tuple

Fields

§exprs: Vec<Expr>
§type_annotation: Option<TypeName>
§inferred_type: InferredType
§source_span: SourceSpan
§

Literal

Fields

§value: String
§type_annotation: Option<TypeName>
§inferred_type: InferredType
§source_span: SourceSpan
§

Number

Fields

§number: Number
§type_annotation: Option<TypeName>
§inferred_type: InferredType
§source_span: SourceSpan
§

Flags

Fields

§flags: Vec<String>
§type_annotation: Option<TypeName>
§inferred_type: InferredType
§source_span: SourceSpan
§

Identifier

Fields

§variable_id: VariableId
§type_annotation: Option<TypeName>
§inferred_type: InferredType
§source_span: SourceSpan
§

Boolean

Fields

§value: bool
§type_annotation: Option<TypeName>
§inferred_type: InferredType
§source_span: SourceSpan
§

Concat

Fields

§exprs: Vec<Expr>
§type_annotation: Option<TypeName>
§inferred_type: InferredType
§source_span: SourceSpan
§

ExprBlock

Fields

§exprs: Vec<Expr>
§type_annotation: Option<TypeName>
§inferred_type: InferredType
§source_span: SourceSpan
§

Not

Fields

§expr: Box<Expr>
§inferred_type: InferredType
§type_annotation: Option<TypeName>
§source_span: SourceSpan
§

GreaterThan

Fields

§lhs: Box<Expr>
§rhs: Box<Expr>
§type_annotation: Option<TypeName>
§inferred_type: InferredType
§source_span: SourceSpan
§

And

Fields

§lhs: Box<Expr>
§rhs: Box<Expr>
§type_annotation: Option<TypeName>
§inferred_type: InferredType
§source_span: SourceSpan
§

Or

Fields

§lhs: Box<Expr>
§rhs: Box<Expr>
§type_annotation: Option<TypeName>
§inferred_type: InferredType
§source_span: SourceSpan
§

GreaterThanOrEqualTo

Fields

§lhs: Box<Expr>
§rhs: Box<Expr>
§type_annotation: Option<TypeName>
§inferred_type: InferredType
§source_span: SourceSpan
§

LessThanOrEqualTo

Fields

§lhs: Box<Expr>
§rhs: Box<Expr>
§type_annotation: Option<TypeName>
§inferred_type: InferredType
§source_span: SourceSpan
§

Plus

Fields

§lhs: Box<Expr>
§rhs: Box<Expr>
§type_annotation: Option<TypeName>
§inferred_type: InferredType
§source_span: SourceSpan
§

Multiply

Fields

§lhs: Box<Expr>
§rhs: Box<Expr>
§type_annotation: Option<TypeName>
§inferred_type: InferredType
§source_span: SourceSpan
§

Minus

Fields

§lhs: Box<Expr>
§rhs: Box<Expr>
§type_annotation: Option<TypeName>
§inferred_type: InferredType
§source_span: SourceSpan
§

Divide

Fields

§lhs: Box<Expr>
§rhs: Box<Expr>
§type_annotation: Option<TypeName>
§inferred_type: InferredType
§source_span: SourceSpan
§

EqualTo

Fields

§lhs: Box<Expr>
§rhs: Box<Expr>
§type_annotation: Option<TypeName>
§inferred_type: InferredType
§source_span: SourceSpan
§

LessThan

Fields

§lhs: Box<Expr>
§rhs: Box<Expr>
§type_annotation: Option<TypeName>
§inferred_type: InferredType
§source_span: SourceSpan
§

Cond

Fields

§cond: Box<Expr>
§lhs: Box<Expr>
§rhs: Box<Expr>
§type_annotation: Option<TypeName>
§inferred_type: InferredType
§source_span: SourceSpan
§

PatternMatch

Fields

§predicate: Box<Expr>
§match_arms: Vec<MatchArm>
§type_annotation: Option<TypeName>
§inferred_type: InferredType
§source_span: SourceSpan
§

Option

Fields

§expr: Option<Box<Expr>>
§type_annotation: Option<TypeName>
§inferred_type: InferredType
§source_span: SourceSpan
§

Result

Fields

§type_annotation: Option<TypeName>
§inferred_type: InferredType
§source_span: SourceSpan
§

Call

Fields

§call_type: CallType
§generic_type_parameter: Option<GenericTypeParameter>
§args: Vec<Expr>
§type_annotation: Option<TypeName>
§inferred_type: InferredType
§source_span: SourceSpan
§

InvokeMethodLazy

Fields

§lhs: Box<Expr>
§method: String
§generic_type_parameter: Option<GenericTypeParameter>
§args: Vec<Expr>
§type_annotation: Option<TypeName>
§inferred_type: InferredType
§source_span: SourceSpan
§

Unwrap

Fields

§expr: Box<Expr>
§inferred_type: InferredType
§type_annotation: Option<TypeName>
§source_span: SourceSpan
§

Throw

Fields

§message: String
§inferred_type: InferredType
§type_annotation: Option<TypeName>
§source_span: SourceSpan
§

GetTag

Fields

§expr: Box<Expr>
§inferred_type: InferredType
§type_annotation: Option<TypeName>
§source_span: SourceSpan
§

ListComprehension

Fields

§iterated_variable: VariableId
§iterable_expr: Box<Expr>
§yield_expr: Box<Expr>
§type_annotation: Option<TypeName>
§inferred_type: InferredType
§source_span: SourceSpan
§

ListReduce

Fields

§reduce_variable: VariableId
§iterated_variable: VariableId
§iterable_expr: Box<Expr>
§type_annotation: Option<TypeName>
§yield_expr: Box<Expr>
§init_value_expr: Box<Expr>
§inferred_type: InferredType
§source_span: SourceSpan
§

Length

Fields

§expr: Box<Expr>
§inferred_type: InferredType
§type_annotation: Option<TypeName>
§source_span: SourceSpan
§

GenerateWorkerName

Fields

§inferred_type: InferredType
§type_annotation: Option<TypeName>
§source_span: SourceSpan
§variable_id: Option<VariableId>

Implementations§

Source§

impl Expr

Source

pub fn as_record(&self) -> Option<Vec<(String, Expr)>>

Source

pub fn from_text(input: &str) -> Result<Expr, String>

Parse a text directly as Rib expression Example of a Rib expression:

  let shopping-cart-worker = instance("my-worker");
  let result = shopping-cart-worker.add-to-cart({product-name: "apple", quantity: 2});

  match result {
    ok(id) => "product-id-${id}",
    err(error_msg) => "Error: ${error_msg}"
  }

Rib supports conditional calls, function calls, pattern-matching, string interpolation (see error_message above) etc.

Source

pub fn lookup(&self, source_span: &SourceSpan) -> Option<Expr>

Source

pub fn is_literal(&self) -> bool

Source

pub fn is_block(&self) -> bool

Source

pub fn is_number(&self) -> bool

Source

pub fn is_record(&self) -> bool

Source

pub fn is_result(&self) -> bool

Source

pub fn is_option(&self) -> bool

Source

pub fn is_tuple(&self) -> bool

Source

pub fn is_list(&self) -> bool

Source

pub fn is_flags(&self) -> bool

Source

pub fn is_identifier(&self) -> bool

Source

pub fn is_select_field(&self) -> bool

Source

pub fn is_if_else(&self) -> bool

Source

pub fn is_function_call(&self) -> bool

Source

pub fn is_match_expr(&self) -> bool

Source

pub fn is_boolean(&self) -> bool

Source

pub fn is_comparison(&self) -> bool

Source

pub fn is_concat(&self) -> bool

Source

pub fn is_multiple(&self) -> bool

Source

pub fn inbuilt_variant(&self) -> Option<(String, Option<Expr>)>

Source

pub fn unwrap(&self) -> Self

Source

pub fn length(expr: Expr) -> Self

Source

pub fn boolean(value: bool) -> Self

Source

pub fn and(left: Expr, right: Expr) -> Self

Source

pub fn throw(message: impl AsRef<str>) -> Self

Source

pub fn generate_worker_name(variable_id: Option<VariableId>) -> Self

Source

pub fn plus(left: Expr, right: Expr) -> Self

Source

pub fn minus(left: Expr, right: Expr) -> Self

Source

pub fn divide(left: Expr, right: Expr) -> Self

Source

pub fn multiply(left: Expr, right: Expr) -> Self

Source

pub fn and_combine(conditions: Vec<Expr>) -> Option<Expr>

Source

pub fn call_worker_function( dynamic_parsed_fn_name: DynamicParsedFunctionName, generic_type_parameter: Option<GenericTypeParameter>, module_identifier: Option<InstanceIdentifier>, args: Vec<Expr>, component_info: Option<ComponentDependencyKey>, ) -> Self

Source

pub fn call( call_type: CallType, generic_type_parameter: Option<GenericTypeParameter>, args: Vec<Expr>, ) -> Self

Source

pub fn invoke_worker_function( lhs: Expr, function_name: String, generic_type_parameter: Option<GenericTypeParameter>, args: Vec<Expr>, ) -> Self

Source

pub fn concat(expressions: Vec<Expr>) -> Self

Source

pub fn cond(cond: Expr, lhs: Expr, rhs: Expr) -> Self

Source

pub fn equal_to(left: Expr, right: Expr) -> Self

Source

pub fn err(expr: Expr, type_annotation: Option<TypeName>) -> Self

Source

pub fn flags(flags: Vec<String>) -> Self

Source

pub fn greater_than(left: Expr, right: Expr) -> Self

Source

pub fn greater_than_or_equal_to(left: Expr, right: Expr) -> Self

Source

pub fn identifier_global( name: impl AsRef<str>, type_annotation: Option<TypeName>, ) -> Self

Source

pub fn identifier_local( name: impl AsRef<str>, id: u32, type_annotation: Option<TypeName>, ) -> Self

Source

pub fn identifier_with_variable_id( variable_id: VariableId, type_annotation: Option<TypeName>, ) -> Self

Source

pub fn less_than(left: Expr, right: Expr) -> Self

Source

pub fn less_than_or_equal_to(left: Expr, right: Expr) -> Self

Source

pub fn range(from: Expr, to: Expr) -> Self

Source

pub fn range_from(from: Expr) -> Self

Source

pub fn range_inclusive(from: Expr, to: Expr) -> Self

Source

pub fn let_binding( name: impl AsRef<str>, expr: Expr, type_annotation: Option<TypeName>, ) -> Self

Source

pub fn let_binding_with_variable_id( variable_id: VariableId, expr: Expr, type_annotation: Option<TypeName>, ) -> Self

Source

pub fn typed_list_reduce( reduce_variable: VariableId, iterated_variable: VariableId, iterable_expr: Expr, init_value_expr: Expr, yield_expr: Expr, inferred_type: InferredType, ) -> Self

Source

pub fn list_reduce( reduce_variable: VariableId, iterated_variable: VariableId, iterable_expr: Expr, init_value_expr: Expr, yield_expr: Expr, ) -> Self

Source

pub fn list_comprehension_typed( iterated_variable: VariableId, iterable_expr: Expr, yield_expr: Expr, inferred_type: InferredType, ) -> Self

Source

pub fn list_comprehension( variable_id: VariableId, iterable_expr: Expr, yield_expr: Expr, ) -> Self

Source

pub fn bind_global_variable_types( &mut self, type_spec: &Vec<GlobalVariableTypeSpec>, )

Source

pub fn bind_instance_types(&mut self)

Source

pub fn literal(value: impl AsRef<str>) -> Self

Source

pub fn empty_expr() -> Self

Source

pub fn expr_block(expressions: Vec<Expr>) -> Self

Source

pub fn not(expr: Expr) -> Self

Source

pub fn ok(expr: Expr, type_annotation: Option<TypeName>) -> Self

Source

pub fn option(expr: Option<Expr>) -> Self

Source

pub fn or(left: Expr, right: Expr) -> Self

Source

pub fn pattern_match(expr: Expr, match_arms: Vec<MatchArm>) -> Self

Source

pub fn record(expressions: Vec<(String, Expr)>) -> Self

Source

pub fn select_field( expr: Expr, field: impl AsRef<str>, type_annotation: Option<TypeName>, ) -> Self

Source

pub fn select_index(expr: Expr, index: Expr) -> Self

Source

pub fn get_tag(expr: Expr) -> Self

Source

pub fn tuple(expressions: Vec<Expr>) -> Self

Source

pub fn sequence( expressions: Vec<Expr>, type_annotation: Option<TypeName>, ) -> Self

Source

pub fn inferred_type_mut(&mut self) -> &mut InferredType

Source

pub fn inferred_type(&self) -> InferredType

Source

pub fn infer_types( &mut self, component_dependency: &ComponentDependencies, global_variable_type_spec: &Vec<GlobalVariableTypeSpec>, custom_instance_spec: &[CustomInstanceSpec], ) -> Result<(), RibTypeErrorInternal>

Source

pub fn infer_types_initial_phase( &mut self, component_dependency: &ComponentDependencies, global_variable_type_spec: &Vec<GlobalVariableTypeSpec>, custom_instance_spec: &[CustomInstanceSpec], ) -> Result<(), RibTypeErrorInternal>

Source

pub fn resolve_method_calls(&mut self) -> Result<(), RibTypeErrorInternal>

Source

pub fn set_origin(&mut self)

Source

pub fn inference_scan( &mut self, component_dependencies: &ComponentDependencies, custom_instance_spec: &[CustomInstanceSpec], ) -> Result<(), RibTypeErrorInternal>

Source

pub fn infer_worker_function_invokes( &mut self, ) -> Result<(), RibTypeErrorInternal>

Source

pub fn bind_variables_of_pattern_match(&mut self)

Source

pub fn bind_variables_of_let_assignment(&mut self)

Source

pub fn bind_variables_of_list_comprehension(&mut self)

Source

pub fn bind_variables_of_list_reduce(&mut self)

Source

pub fn identify_instance_creation( &mut self, component_dependency: &ComponentDependencies, custom_instance_spec: &[CustomInstanceSpec], ) -> Result<(), RibTypeErrorInternal>

Source

pub fn ensure_stateful_instance(&mut self)

Source

pub fn infer_function_call_types( &mut self, component_dependency: &ComponentDependencies, custom_instance_spec: &[CustomInstanceSpec], ) -> Result<(), RibTypeErrorInternal>

Source

pub fn push_types_down(&mut self) -> Result<(), RibTypeErrorInternal>

Source

pub fn infer_all_identifiers(&mut self)

Source

pub fn pull_types_up( &mut self, component_dependencies: &ComponentDependencies, ) -> Result<(), RibTypeErrorInternal>

Source

pub fn infer_global_inputs(&mut self)

Source

pub fn bind_type_annotations(&mut self)

Source

pub fn check_types( &mut self, component_dependency: &ComponentDependencies, ) -> Result<(), RibTypeErrorInternal>

Source

pub fn unify_types(&mut self) -> Result<(), RibTypeErrorInternal>

Source

pub fn merge_inferred_type(&self, new_inferred_type: InferredType) -> Expr

Source

pub fn add_infer_type_mut(&mut self, new_inferred_type: InferredType)

Source

pub fn reset_type(&mut self)

Source

pub fn source_span(&self) -> SourceSpan

Source

pub fn type_annotation(&self) -> &Option<TypeName>

Source

pub fn with_type_annotation_opt( &self, type_annotation: Option<TypeName>, ) -> Expr

Source

pub fn with_type_annotation(&self, type_annotation: TypeName) -> Expr

Source

pub fn with_type_annotation_mut(&mut self, type_annotation: TypeName)

Source

pub fn with_source_span(&self, new_source_span: SourceSpan) -> Expr

Source

pub fn with_source_span_mut(&mut self, new_source_span: SourceSpan)

Source

pub fn with_inferred_type(&self, new_inferred_type: InferredType) -> Expr

Source

pub fn with_inferred_type_mut(&mut self, new_inferred_type: InferredType)

Source

pub fn infer_enums(&mut self, component_dependency: &ComponentDependencies)

Source

pub fn infer_variants(&mut self, component_dependency: &ComponentDependencies)

Source

pub fn visit_expr_nodes_lazy<'a>( &'a mut self, queue: &mut VecDeque<&'a mut Expr>, )

Source

pub fn number_inferred( big_decimal: BigDecimal, type_annotation: Option<TypeName>, inferred_type: InferredType, ) -> Expr

Source

pub fn number(big_decimal: BigDecimal) -> Expr

Trait Implementations§

Source§

impl Clone for Expr

Source§

fn clone(&self) -> Expr

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Expr

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Expr

Source§

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 Display for Expr

Source§

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

Formats the value using the given formatter. Read more
Source§

impl From<Expr> for Expr

Source§

fn from(value: Expr) -> Self

Converts to this type from the input type.
Source§

impl Hash for Expr

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 Expr

Source§

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

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

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

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

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

Compares and returns the minimum of two values. Read more
1.50.0 · 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 Expr

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Expr

Source§

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

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · 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 · 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 · 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 · 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 Serialize for Expr

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TryFrom<Expr> for Expr

Available on crate feature protobuf only.
Source§

type Error = String

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

fn try_from(value: Expr) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl Eq for Expr

Source§

impl StructuralPartialEq for Expr

Auto Trait Implementations§

§

impl Freeze for Expr

§

impl RefUnwindSafe for Expr

§

impl Send for Expr

§

impl Sync for Expr

§

impl Unpin for Expr

§

impl UnwindSafe for Expr

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> GetSetFdFlags for T

Source§

fn get_fd_flags(&self) -> Result<FdFlags, Error>
where T: AsFilelike,

Query the “status” flags for the self file descriptor.
Source§

fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>
where T: AsFilelike,

Create a new SetFdFlags value for use with set_fd_flags. Read more
Source§

fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>
where T: AsFilelike,

Set the “status” flags for the self file descriptor. 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Pointee for T

Source§

type Pointer = u32

Source§

fn debug( pointer: <T as Pointee>::Pointer, f: &mut Formatter<'_>, ) -> Result<(), Error>

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

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