LinePolicy
Mojo trait 🡭
LinePolicy
Section titled “LinePolicy”Classify a raw line before it reaches the data-row path.
The DelimitedReader calls classify() on every line. The returned
LineDisposition controls what happens next:
YIELD — hand the line to the field-splitting path as a normal row.
SKIP — discard the line and advance.
METADATA — route the line to handle_metadata() then advance.
HEADER — parse the line as column names then advance.
STOP — terminate iteration immediately (e.g. embedded FASTA block).
Implemented traits
Section titled “Implemented traits”AnyType, Copyable, ImplicitlyCopyable, ImplicitlyDestructible, Movable, RegisterPassable, TrivialRegisterPassable
Methods
Section titled “Methods”__init__
Section titled “__init__”def __init__() -> _SelfReturns:
_Self
def __init__(out self: _Self, *, copy: _Self)Create a new instance of the value by copying an existing one.
Args:
- copy (
_Self): The value to copy. - self (
_Self)
Returns:
_Self
def __init__(out self: _Self, *, deinit take: _Self)Create a new instance of the value by moving the value of another.
Args:
- take (
_Self): The value to move. - self (
_Self)
Returns:
_Self
classify
Section titled “classify”def classify(self: _Self, line: Span[UInt8, line.origin]) -> LineActionArgs:
- self (
_Self) - line (
Span)
Returns:
LineAction
def copy(self: _Self) -> _SelfExplicitly construct a copy of self, a convenience method for Self(copy=self) when the type is inconvenient to write out.
Args:
- self (
_Self)
Returns:
_Self: A copy of this value.