Enum dpdk_unix::ListParseError [−]
pub enum ListParseError {
IoError(Error),
ContainsAnEmptyIndexOrRange,
CouldNotParseIndex(&'static str, String, ParseIntError),
ContainsMisSortedIndices(u16, u16),
RangeIsNotAnAscendingRangeWithMoreThanOneElement(u16, u16),
}List parse error.
Variants
IoError(Error)An IO error.
ContainsAnEmptyIndexOrRangeContains an empty index or range.
CouldNotParseIndex(&'static str, String, ParseIntError)Could not parse index.
ContainsMisSortedIndices(u16, u16)Contains mis-sorted indices.
RangeIsNotAnAscendingRangeWithMoreThanOneElement(u16, u16)Range is not an ascending range with more than one element.
Methods
impl ListParseError[src]
impl ListParseErrorpub fn parse_linux_list_string<Mapper: Fn(u16) -> R, R: Ord>(
linux_list_string: &str,
mapper: Mapper
) -> Result<BTreeSet<R>, ListParseError>[src]
pub fn parse_linux_list_string<Mapper: Fn(u16) -> R, R: Ord>(
linux_list_string: &str,
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 Debug for ListParseError[src]
impl Debug for ListParseErrorfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Display for ListParseError
impl Display for ListParseErrorimpl Error for ListParseError
impl Error for ListParseErrorfn description(&self) -> &str
fn description(&self) -> &strThis method is soft-deprecated. Read more
fn cause(&self) -> Option<&Error>
fn cause(&self) -> Option<&Error>The lower-level cause of this error, if any. Read more
impl From<Error> for ListParseError
impl From<Error> for ListParseErrorfn from(err: Error) -> ListParseError
fn from(err: Error) -> ListParseErrorPerforms the conversion.
Auto Trait Implementations
impl Send for ListParseError
impl Send for ListParseErrorimpl Sync for ListParseError
impl Sync for ListParseError