Enum msi::ColumnCategory
[−]
[src]
pub enum ColumnCategory {
Text,
UpperCase,
LowerCase,
Integer,
DoubleInteger,
Identifier,
Property,
Filename,
WildCardFilename,
Path,
Paths,
AnyPath,
DefaultDir,
RegPath,
Formatted,
KeyFormatted,
Template,
Condition,
Guid,
Version,
Language,
Binary,
CustomSource,
Cabinet,
Shortcut,
Url,
}Indicates the format of a string-typed database column.
Variants
TextUpperCaseA text string containing no lowercase letters.
Examples
assert!(msi::ColumnCategory::UpperCase.validate("HELLO, WORLD!")); assert!(!msi::ColumnCategory::UpperCase.validate("Hello, World!"));
LowerCaseA text string containing no uppercase letters.
Examples
assert!(msi::ColumnCategory::LowerCase.validate("hello, world!")); assert!(!msi::ColumnCategory::LowerCase.validate("Hello, World!"));
IntegerA signed 16-bit integer.
Examples
assert!(msi::ColumnCategory::Integer.validate("32767")); assert!(msi::ColumnCategory::Integer.validate("-47")); assert!(!msi::ColumnCategory::Integer.validate("40000"));
DoubleIntegerA signed 32-bit integer.
Examples
assert!(msi::ColumnCategory::DoubleInteger.validate("2147483647")); assert!(msi::ColumnCategory::DoubleInteger.validate("-99999")); assert!(!msi::ColumnCategory::DoubleInteger.validate("3000000000"));
IdentifierA string identifier (such as a table or column name). May only contain alphanumerics, underscores, and periods, and must start with a letter or underscore.
Examples
assert!(msi::ColumnCategory::Identifier.validate("HelloWorld")); assert!(msi::ColumnCategory::Identifier.validate("_99.Bottles")); assert!(!msi::ColumnCategory::Identifier.validate("3.14159"));
PropertyA string that is either an identifier (see above), or a reference to an
environment variable (which consists of a % character followed by an
identifier).
Examples
assert!(msi::ColumnCategory::Property.validate("HelloWorld")); assert!(msi::ColumnCategory::Property.validate("%HelloWorld")); assert!(!msi::ColumnCategory::Property.validate("Hello%World"));
FilenameThe name of a file or directory.
WildCardFilenameA filename that can contain shell glob wildcards.
PathA string containing an absolute filepath.
PathsA string containing a semicolon-separated list of absolute filepaths.
AnyPathA string containing an absolute or relative filepath.
DefaultDirA string containing either a filename or an identifier.
RegPathA string containing a registry path.
FormattedA string containing special formatting escapes, such as environment variables.
KeyFormattedUnknown.
TemplateLike Formatted, but allows additional escapes.
ConditionA string represeting a boolean predicate.
GuidA hyphenated, uppercase GUID string, enclosed in curly braces.
VersionA string containing a version number. The string must consist of at most four period-separated numbers, with each number being at most 65535.
Examples
assert!(msi::ColumnCategory::Version.validate("1")); assert!(msi::ColumnCategory::Version.validate("1.22")); assert!(msi::ColumnCategory::Version.validate("1.22.3")); assert!(msi::ColumnCategory::Version.validate("1.22.3.444")); assert!(!msi::ColumnCategory::Version.validate("1.99999")); assert!(!msi::ColumnCategory::Version.validate(".12")); assert!(!msi::ColumnCategory::Version.validate("1.2.3.4.5"));
LanguageA string containing a comma-separated list of deciaml language ID numbers.
BinaryA string that refers to a binary data stream.
CustomSourceA string that refers to a custom source.
CabinetA string that refers to a cabinet.
ShortcutA string that refers to a shortcut.
UrlA string containing a URL.
Methods
impl ColumnCategory[src]
fn validate(&self, string: &str) -> bool
Returns true if the given string is valid to store in a database column with this category.
Trait Implementations
impl Clone for ColumnCategory[src]
fn clone(&self) -> ColumnCategory
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more
impl Copy for ColumnCategory[src]
impl Debug for ColumnCategory[src]
impl Eq for ColumnCategory[src]
impl Hash for ColumnCategory[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher]. Read more
impl PartialEq for ColumnCategory[src]
fn eq(&self, __arg_0: &ColumnCategory) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0
This method tests for !=.
impl Display for ColumnCategory[src]
fn fmt(&self, formatter: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more