pub enum GuiValidation {
Show 33 variants
UncheckedValue,
DatatypeExpr,
Datacontext,
Datamodel,
Boolean,
Yes,
Align,
Integer,
UnsignedInteger,
Number,
NumberOrInt32,
NumberF,
NumberOrPercent,
TwoNumberOrPercent,
CVector2f,
CVector2i,
CVector3f,
CVector4f,
Color,
CString,
Item(Item),
ItemOrBlank(Item),
Blendmode,
MouseButton(&'static [&'static str]),
MouseButtonSet(&'static [&'static str]),
Choice(&'static [&'static str]),
ChoiceSet(&'static [&'static str]),
Widget,
Format,
FormatOverride,
RawText,
Text,
ComplexProperty,
}
Expand description
The various values or blocks or datatype calculations that the gui properties can take.
Variants§
UncheckedValue
Accept any value; we don’t know.
DatatypeExpr
A datatype expression; we don’t know the specific type.
Datacontext
A datatype expression that ends with a promote. Can be any type.
Datamodel
A datatype expression that returns a collection of some sort.
Boolean
“yes”, “no”, or a Datatype::bool
expression.
Yes
Only a literal “yes” will do.
Align
A |
-separated list of values from ALIGN
.
Integer
An integer value or a Datatype::int32
expression.
UnsignedInteger
A non-negative integer value or a Datatype::uint32
expression.
Number
A numeric value or a Datatype::float
expression.
NumberOrInt32
A numeric value or a Datatype::float
or Datatype::int32
expression.
NumberF
A numeric value possibly followed by an f
or a Datatype::float
expression.
NumberOrPercent
A numeric value, possibly followed by a %
mark, or a Datatype::int32
or
Datatype::float
expression.
TwoNumberOrPercent
A block with two numeric values, possibly followed by %
marks, or a
Datatype::CVector2f
expression.
CVector2f
A block with 2 numbers, or a Datatype::CVector2f
expression.
CVector2i
A block with 2 integers, or a Datatype::CVector2i
expression.
CVector3f
A block with 3 numbers, or a Datatype::CVector3f
expression.
CVector4f
A block with 4 numbers, or a Datatype::CVector4f
expression.
Color
A block with 4 numbers (RGBA), or a Datatype::CVector4f
expression.
The difference with GuiValidation::CVector4f
is in the error messages.
CString
A datatype expression returning a CString
Item(Item)
A key for this item type, or a datatype expression that can be converted to string.
ItemOrBlank(Item)
A key for this item type, or a datatype expression that can be converted to string. May be the empty string.
Blendmode
One of the strings in the BLENDMODES
array
MouseButton(&'static [&'static str])
One of the mouse buttons in the array given here.
MouseButtonSet(&'static [&'static str])
A |
-separated list of the mouse buttons in the array given here.
Choice(&'static [&'static str])
One of the strings in the array given here.
ChoiceSet(&'static [&'static str])
A |
-separated list of strings from the array given here.
Widget
A block containing one widget, or the name of a template containing one widget.
Format
A string containing a localization text format specifier starting with #
FormatOverride
A block containing two textformat names
RawText
Some text. May contain datatypes or loca keys, but it’s optional.
Text
Some text. May contain datatypes or loca keys.
ComplexProperty
A property that takes a block of other properties. This block may have override blocks in it.
Implementations§
Source§impl GuiValidation
impl GuiValidation
Sourcepub fn from_property(property: WidgetProperty) -> Self
pub fn from_property(property: WidgetProperty) -> Self
Get the validation logic for a specific widget property
Trait Implementations§
Source§impl Clone for GuiValidation
impl Clone for GuiValidation
Source§fn clone(&self) -> GuiValidation
fn clone(&self) -> GuiValidation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for GuiValidation
impl Debug for GuiValidation
Source§impl Hash for GuiValidation
impl Hash for GuiValidation
Source§impl PartialEq for GuiValidation
impl PartialEq for GuiValidation
impl Copy for GuiValidation
impl Eq for GuiValidation
impl StructuralPartialEq for GuiValidation
Auto Trait Implementations§
impl Freeze for GuiValidation
impl RefUnwindSafe for GuiValidation
impl Send for GuiValidation
impl Sync for GuiValidation
impl Unpin for GuiValidation
impl UnwindSafe for GuiValidation
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,
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Any
.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Any
.§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.