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, Deinitable, ImplicitlyCopyable, Movable, RegisterPassable, TrivialRegisterPassable
Methods
Section titled “Methods”__init__
Section titled “__init__”fn def __init__() -> SelfReturns:
_Self
fn def __init__(out 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
fn def __init__(out self, *, deinit move: Self)Create a new instance of the value by moving the value of another.
Args:
- move (
_Self): The value to move. - self (
_Self)
Returns:
_Self
classify
Section titled “classify”fn def classify(self, line: Span[UInt8]) -> LineActionArgs:
- self (
_Self) - line (
Span[UInt8])
Returns:
LineAction
fn def copy(self) -> SelfExplicitly construct a copy of self, a convenience method for Self(copy=self) when the type is inconvenient to write out.
Overriding this method is not allowed.
Args:
- self (
_Self)
Returns:
_Self: A copy of this value.