Enum nt_hive::NtHiveNameString[][src]

pub enum NtHiveNameString<'a> {
    Latin1(&'a [u8]),
    Utf16LE(&'a [u8]),
}
Expand description

Zero-copy representation of a key name or value name string stored in hive data. Can be either in Latin1 (ISO-8859-1) or UTF-16 (Little-Endian).

This allows to work with the string without performing any allocations or conversions. If the alloc feature is enabled, to_string_checked and to_string_lossy can be used to to retrieve a String.

Variants

Latin1(&'a [u8])

A byte stream where each byte is a single character of the Latin1 (ISO-8859-1) character set. Each byte can simply be casted to a char (as Unicode is ordered the same as Latin1).

Tuple Fields of Latin1

0: &'a [u8]
Utf16LE(&'a [u8])

A byte stream where every two bytes make up a UTF-16 code point in little-endian order. Use u16::from_le_bytes and char::decode_utf16 if you want to get a stream of chars.

Tuple Fields of Utf16LE

0: &'a [u8]

Implementations

Returns true if self has a length of zero bytes.

Returns the length of self.

This length is in bytes, not characters! In other words, it may not be what a human considers the length of the string.

Attempts to convert self to an owned String. Returns Some(String) if all characters could be converted successfully or None if a decoding error occurred.

Converts self to an owned String, replacing invalid data with the replacement character (U+FFFD).

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Checks that two strings are a case-insensitive match (according to Windows’ definition of case-insensitivity, which only considers the Unicode Basic Multilingual Plane).

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.