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.
ContainsAnEmptyIndexOrRange
Contains 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 ListParseError
pub 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 ListParseError
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Display for ListParseError
impl Display for ListParseError
impl Error for ListParseError
impl Error for ListParseError
fn description(&self) -> &str
fn description(&self) -> &str
This 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 ListParseError
fn from(err: Error) -> ListParseError
fn from(err: Error) -> ListParseError
Performs the conversion.
Auto Trait Implementations
impl Send for ListParseError
impl Send for ListParseError
impl Sync for ListParseError
impl Sync for ListParseError