FaiView
Mojo struct 🡭
FaiView
Section titled “FaiView”@memory_onlystruct FaiView[O: Origin[mut=O.mut]]Zero-copy view over one FAI index row in the parser’s buffer.
Lifetime: Valid only until the next parser read. Do not store in
collections; call .to_record() to get an owned FaiRecord when the
record must outlive the current iteration step.
Parameters
Section titled “Parameters”- O (
Origin)
Implemented traits
Section titled “Implemented traits”AnyType, ImplicitlyDestructible, Movable, Sized
Methods
Section titled “Methods”__init__
Section titled “__init__”def __init__(out self, _name: Span[UInt8, O], _length: Int64, _offset: Int64, _line_bases: Int64, _line_width: Int64, _qual_offset: Optional[Int64])Args:
- _name (
Span) - _length (
Int64) - _offset (
Int64) - _line_bases (
Int64) - _line_width (
Int64) - _qual_offset (
Optional) - self (
Self)
Returns:
Self
def name(self) -> StringSlice[O]Return the sequence name (valid only while view is valid).
Args:
- self (
Self)
Returns:
StringSlice
length
Section titled “length”def length(self) -> Int64Args:
- self (
Self)
Returns:
Int64
offset
Section titled “offset”def offset(self) -> Int64Args:
- self (
Self)
Returns:
Int64
line_bases
Section titled “line_bases”def line_bases(self) -> Int64Args:
- self (
Self)
Returns:
Int64
line_width
Section titled “line_width”def line_width(self) -> Int64Args:
- self (
Self)
Returns:
Int64
qual_offset
Section titled “qual_offset”def qual_offset(self) -> Optional[Int64]Args:
- self (
Self)
Returns:
Optional
__len__
Section titled “__len__”def __len__(self) -> IntReturn the reference length as an Int.
Args:
- self (
Self)
Returns:
Int
to_record
Section titled “to_record”def to_record(self) -> FaiRecordMaterialize an owned FaiRecord. Call when the record must outlive the view.
Args:
- self (
Self)
Returns:
FaiRecord