mendraw/mendix/formatter
Formats and parses values through a Mendix value formatter handle.
Types
Describes a value that a Mendix formatter rejected.
pub type ParseError {
InvalidFormattedValue(input: String)
}
Constructors
-
InvalidFormattedValue(input: String)The formatter could not interpret the supplied text.
A typed ValueFormatter value used by the formatter capability.
pub type ValueFormatter
Values
pub fn format(
fmt fmt: ValueFormatter,
value value: option.Option(a),
) -> String
Formats an optional value for display.
pub fn parse(
fmt fmt: ValueFormatter,
text text: String,
) -> Result(option.Option(a), ParseError)
Parses user-facing text through the Mendix formatter.