Module brane_ctl::wizard::validator

source ·

Structs§

  • The validator is a wrapper for all types that implement std::str::FromStr, it uses FromStr to validate if the provided input is correct. This assumes that the Result that FromStr provides correctly distinguishes correct from incorrect inputs. If your FromStr implementation is expensive, this might come at a performance hit.
  • The map validator can validate mappings from between different types of values. By default these values are separated by a :, but this is configurable using the separator field.
  • A validator that solely validates that there if some input was provided
  • A validator that validates whether the provided number is a valid port number Yes this is basically a check if something fits in a u16
  • A validator that checks whether the provided input is a valid range. It by default uses a - as range seperator, but this is configurable using the seperator field. It allows whitespace around the range values. The segment validator validates the separate parts of the range using the same instance.

Type Aliases§

  • A placeholder concrete type in cases where no validator is necessary A validator can be used to provide a shared concrete type when none are available.