pub struct ReadSegment {
    pub length: Option<usize>,
    pub kind: SegmentType,
    /* private fields */
}
Expand description

The read segment describing a given kind (SegmentType), optional length, and offset of the bases within a crate::read_structure::ReadStructure.

Fields

length: Option<usize>

The optional length of this segment

kind: SegmentType

The segment type

Implementations

Extract the bases corresponding to this ReadSegment from a slice.

Errors
  • If the segment does not fall wholely within the slice.

Extract the bases and corresponding quals to this ReadSegment from a slice.

Errors
  • If the segment does not fall wholely within the slice.
  • If the bases and quals lengths are not equal.

Returns the length of the read segment.

Returns true if the read segment has a length defined (i.e. not None)

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the ReadSegment as a string.

Builds a ReadSegment from a string representation. The character representation of SegmentType must be the last character, while the leading character(s) either a non-zero integer, or the any-length character.

Errors

Returns Err if the string was too short, if the length could not be parsed, or if the segment type could not be recognized.

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 !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.