pub enum ListParseError {
IoError(Error),
ContainsAnEmptyIndexOrRange,
CouldNotParseIndexAsNotAString {
description: &'static str,
unparsable_index: Box<[u8]>,
cause: Utf8Error,
},
CouldNotParseIndex {
description: &'static str,
unparsable_index: String,
cause: ParseIntError,
},
ContainsMisSortedIndices {
first: u16,
next_minimum_index_expected: u16,
},
RangeIsNotAnAscendingRangeWithMoreThanOneElement {
first: u16,
second: u16,
},
}
Contains an empty index or range.
Could not parse index (not a string).
Fields of CouldNotParseIndexAsNotAString
Fields of CouldNotParseIndex
Contains mis-sorted indices.
Fields of ContainsMisSortedIndices
Minimum expected for next index.
Range is not an ascending range with more than one element.
Fields of RangeIsNotAnAscendingRangeWithMoreThanOneElement
Parses a Linux list string used for cpu sets, core masks and NUMA nodes such as "2,4-31,32-63" and "1,2,10-20,100-2000:2/25" (see https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html for an awful description of this mad syntax).
Returns a BTreeSet with the zero-based indices found in the string. For example, "2,4-31,32-63" would return a set with all values between 0 to 63 except 0, 1 and 3.
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
The lower-level source of this error, if any. Read more
Deprecated since 1.33.0:
replaced by Error::source, which can support downcasting
The lower-level cause of this error, if any. Read more
Converts the given value to a String
. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static