RangeValidationRule
struct · ferroui-xaml-interactions-custom · v0.5.0
struct RangeValidationRule
Validation rule that checks that a value is within a range.
Deviation (DEVIATIONS.md, Behaviors): the reference class is generic over the type T of the
value (RangeValidationRule<T>, created in markup with x:TypeArguments); classes of the class
model are not generic, so the bounds are untyped values, compared with the validated value by
the ordering of untyped values (ValueTypes::compare, which converts a bound to the type of
the value). Unset bounds are null (the reference's default of a value type T is its zero),
and values that do not compare are not valid (the comparer of the reference throws).
Members
TYPEto_refminimum_propertymaximum_propertyerror_message_propertyconstructnewminimumset_minimummaximumset_maximumerror_messageset_error_messagevalidate
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<RangeValidationRule>
Returns a strong reference to this object.
minimum_property
fn minimum_property() -> &'static StyledProperty<Option<BoxedValue>>
Identifies the Minimum property.
maximum_property
fn maximum_property() -> &'static StyledProperty<Option<BoxedValue>>
Identifies the Maximum property.
error_message_property
fn error_message_property() -> &'static StyledProperty<Option<String>>
Identifies the ErrorMessage property.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
new
fn new() -> Ref<Self>
Creates a rule.
minimum
fn minimum(self: &Self) -> Option<BoxedValue>
Gets or sets the minimum value. This is a property of the object model.
set_minimum
fn set_minimum(self: &Self, value: Option<BoxedValue>)
maximum
fn maximum(self: &Self) -> Option<BoxedValue>
Gets or sets the maximum value. This is a property of the object model.
set_maximum
fn set_maximum(self: &Self, value: Option<BoxedValue>)
error_message
fn error_message(self: &Self) -> Option<String>
Gets or sets the error message for failed validation. This is a property of the object model.
set_error_message
fn set_error_message(self: &Self, value: Option<String>)
validate
fn validate(self: &Self, value: Option<&BoxedValue>) -> bool
Validates the specified value: valid when it is not null and within the bounds.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyFerroObjectImplExtClassDefaultsErasedDestructorIntoEitherDerefUpcast<T>Upcast<RangeValidationRule>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleFerroObjectImplIValidationRule
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.