[−][src]Enum dpdk_unix::ListParseError
List parse error.
Variants
IoError(Error)
An IO error.
ContainsAnEmptyIndexOrRange
Contains an empty index or range.
CouldNotParseIndexAsNotAString
Could not parse index (not a string).
Fields of CouldNotParseIndexAsNotAString
CouldNotParseIndex
Could not parse index.
Fields of CouldNotParseIndex
description: &'static str
Description.
unparsable_index: String
Unparsable index.
cause: ParseIntError
Cause.
ContainsMisSortedIndices
Contains mis-sorted indices.
Fields of ContainsMisSortedIndices
RangeIsNotAnAscendingRangeWithMoreThanOneElement
Range is not an ascending range with more than one element.
Fields of RangeIsNotAnAscendingRangeWithMoreThanOneElement
Methods
impl ListParseError
[src]
pub fn parse_linux_list_string<Mapper: Fn(u16) -> R, R: Ord>(
linux_list_string: &[u8],
mapper: Mapper
) -> Result<BTreeSet<R>, ListParseError>
[src]
linux_list_string: &[u8],
mapper: Mapper
) -> Result<BTreeSet<R>, ListParseError>
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.
Trait Implementations
impl From<ListParseError> for ProcessStatusStatisticParseError
[src]
fn from(error: ListParseError) -> Self
[src]
impl From<Error> for ListParseError
[src]
impl Debug for ListParseError
[src]
impl Display for ListParseError
[src]
impl Error for ListParseError
[src]
fn source(&self) -> Option<&(dyn Error + 'static)>
[src]
fn description(&self) -> &str
1.0.0[src]
This method is soft-deprecated. Read more
fn cause(&self) -> Option<&dyn Error>
1.0.0[src]
replaced by Error::source, which can support downcasting
The lower-level cause of this error, if any. Read more
Auto Trait Implementations
impl Send for ListParseError
impl Sync for ListParseError
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,