Struct hcklib::field_range::FieldRange [−][src]
Expand description
Represent a range of columns to keep.
Fields
low: usize
high: usize
pos: usize
Implementations
Parse a comma separated list of fields and merge any overlaps
pub fn from_header_list(
list: &[Regex],
header: &[u8],
delim: &RegexOrStr<'_>,
header_is_regex: bool
) -> Result<Vec<FieldRange>, FieldError>
pub fn from_header_list(
list: &[Regex],
header: &[u8],
delim: &RegexOrStr<'_>,
header_is_regex: bool
) -> Result<Vec<FieldRange>, FieldError>
Get the indices of the headers that match any of the provided regex’s.
Sort and merge overlaps in a set of Vec<FieldRange>
.
Trait Implementations
Convert a str
into a FieldRange
type Err = FieldError
type Err = FieldError
The associated error which can be returned from parsing.
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
Auto Trait Implementations
impl RefUnwindSafe for FieldRange
impl Send for FieldRange
impl Sync for FieldRange
impl Unpin for FieldRange
impl UnwindSafe for FieldRange
Blanket Implementations
Mutably borrows from an owned value. Read more