Skip to content

MmapSource

Mojo struct 🡭

@memory_only
struct MmapSource

Zero-copy source over a memory-mapped file.

Owns the mapping so record views remain valid for the parser’s lifetime.

  • map (MappedFile)

AnyType, Deinitable, Movable

fn def __init__(out self, path: Path)

Args:

  • path (Path)
  • self (Self)

Returns:

Self

Raises:

fn def context(self) -> ParseContext

Args:

  • self (Self)

Returns:

ParseContext

fn def note_consumed(mut self)

Args:

  • self (Self)
fn def has_more(self) -> Bool

Args:

  • self (Self)

Returns:

Bool

fn def find_next[mode: Int8](mut self) -> FoundRecord

Parameters:

  • mode (Int8)

Args:

  • self (Self)

Returns:

FoundRecord

Raises: