# ComparisonConditionTypeHelper

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-xaml-interactivity/helpers/struct-comparisonconditiontypehelper/

**struct** · [`ferroui-xaml-interactivity`](/docs/0.5.0/api/ferroui-xaml-interactivity/) · v0.5.0

```rust
struct ComparisonConditionTypeHelper
```

Compares the operands of a condition.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/helpers/comparison_condition_type_helper.rs#L11)

## Members

- [`compare`](#function-compare)

<a id="function-compare"></a>

### compare

```rust
fn compare(left_operand: Option<&BoxedValue>, operator_type: ComparisonConditionType, right_operand: Option<&BoxedValue>) -> Result<bool, String>
```

Compares `left_operand` and `right_operand` with `operator_type`.

A text right operand is first converted to the type of the left operand. Two comparable
operands are compared by order (after converting the right one to the type of the left
one; operands that do not convert or compare are not equal); other operands support only
`Equal` and
`NotEqual`.
## Errors
An ordering operator with an operand that is not comparable: the argument exception of the
reference.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/helpers/comparison_condition_type_helper.rs#L25)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
