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
Text
UpperCase
A text string containing no lowercase letters.
Examples
assert!(msi::ColumnCategory::UpperCase.validate("HELLO, WORLD!")); assert!(!msi::ColumnCategory::UpperCase.validate("Hello, World!"));
LowerCase
A text string containing no uppercase letters.
Examples
assert!(msi::ColumnCategory::LowerCase.validate("hello, world!")); assert!(!msi::ColumnCategory::LowerCase.validate("Hello, World!"));
Integer
A signed 16-bit integer.
Examples
assert!(msi::ColumnCategory::Integer.validate("32767")); assert!(msi::ColumnCategory::Integer.validate("-47")); assert!(!msi::ColumnCategory::Integer.validate("40000"));
DoubleInteger
A signed 32-bit integer.
Examples
assert!(msi::ColumnCategory::DoubleInteger.validate("2147483647")); assert!(msi::ColumnCategory::DoubleInteger.validate("-99999")); assert!(!msi::ColumnCategory::DoubleInteger.validate("3000000000"));
Identifier
A 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"));
Property
A 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"));
Filename
The name of a file or directory.
WildCardFilename
A filename that can contain shell glob wildcards.
Path
A string containing an absolute filepath.
Paths
A string containing a semicolon-separated list of absolute filepaths.
AnyPath
A string containing an absolute or relative filepath.
DefaultDir
A string containing either a filename or an identifier.
RegPath
A string containing a registry path.
Formatted
A string containing special formatting escapes, such as environment variables.
KeyFormatted
Unknown.
Template
Like Formatted
, but allows additional escapes.
Condition
A string represeting a boolean predicate.
Guid
A hyphenated, uppercase GUID string, enclosed in curly braces.
Version
A 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"));
Language
A string containing a comma-separated list of deciaml language ID numbers.
Binary
A string that refers to a binary data stream.
CustomSource
A string that refers to a custom source.
Cabinet
A string that refers to a cabinet.
Shortcut
A string that refers to a shortcut.
Url
A 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) -> bool
1.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