src/scan/ByteBlockReader.bend relies on unsafe/foreign
raw source on the hub · import mylsm-lsm-store@0.6.0.2/src/scan/ByteBlockReader.bend as ByteBlockReader
16 imports
import Base import ../ByteSstFile.bend as ByteSstFile import ../ByteWal.bend as ByteWal import ../Wal.bend as Wal import ../ByteMemTable.bend as ByteMemTable import ../StorageBytes.bend as StorageBytes import ../ByteRecoveryPolicy.bend as RecoveryPolicy import ../Fs.bend as Fs import ../SstStreamIo.bend as SstStreamIo import ../coordinator/QueuePolicy.bend as QueuePolicy import ./BlockOrder.bend as BlockOrder import ./BlockIndexPolicy.bend as BlockIndexPolicy import ./BlockIndexFormatPolicy.bend as BlockIndexFormatPolicy import ./BlockRoutePolicy.bend as BlockRoutePolicy import ../hub_sha/sha256.bend as SHA import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes
Types
type State source · line 19 · raw
Type
Retains bounded traversal metadata without materializing the table entries.
State@size:Nat -> @header:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @index_offset:Nat -> @used:Nat -> @total:U32 -> @block_count:U32 -> @next_block:U32 -> @decoded:U32 -> @root_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> @index_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> @last_key:Maybe<&1, 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes> -> @selected:Bool -> State
type Reader source · line 26 · raw
Type
Owns the open file and its current stream position.
Reader@file:File -> @state:State -> Reader
type Metadata source · line 30 · raw
Data
Retains only the authenticated file's fixed-size table and index metadata.
Metadata@size:Nat -> @total:U32 -> @block_count:U32 -> @index_offset:Nat -> @live_entries:Nat -> @payload_bytes:Nat -> Metadata
type Step source · line 35 · raw
Type
Represents one decoded block, end of input, or a read failure.
Block@reader:Reader -> @entries:List<&1, 0x7586b743ff7fd05e412d5115859629b6/src/ByteMemTable.Entry> -> Step
EndStep
type EntryCursor source · line 40 · raw
Type
Owns the active reader and the unread entries from its current block.
EntryReady@reader:Reader -> @entries:List<&1, 0x7586b743ff7fd05e412d5115859629b6/src/ByteMemTable.Entry> -> EntryCursor
EntryEndedEntryCursor
EntryClosedEntryCursor
EntryFailed@error:Pair(U32, String) -> EntryCursor
type EntryStep source · line 47 · raw
Type
Represents one entry, an empty block, end of file, or a terminal error.
EntryItem@entry:0x7586b743ff7fd05e412d5115859629b6/src/ByteMemTable.Entry -> @cursor:EntryCursor -> EntryStep
EntrySkip@cursor:EntryCursor -> EntryStep
EntryEndEntryStep
EntryError@cursor:EntryCursor -> EntryStep
type BodyContext source · line 55 · raw
Type
Carries the block header while the bounded body read is in flight.
BodyContext@state:State -> @block_header:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @payload_length:U32 -> BodyContext
type IndexPageState source · line 59 · raw
Type
Retains one bounded serialized-index page and its incremental validators.
IndexPageNeed@file:File -> @reader:IndexMeta -> @offset:Nat -> @remaining:Nat -> @actual_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> @root_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> IndexPageState
IndexPageRead@pair:Pair(File, Result<&1, &1, Pair(U32, String), 0x7586b743ff7fd05e412d5115859629b6/src/SstStreamIo.ExactResult>) -> @reader:IndexMeta -> @offset:Nat -> @remaining:Nat -> @actual_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> @root_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> IndexPageState
IndexPageParsed@file:File -> @result:Result<&1, &1, Pair(U32, String), IndexPageData> -> IndexPageState
type IndexPageData source · line 68 · raw
Type
Carries page validation outputs without retaining serialized index bytes.
IndexPageData@reader:IndexMeta -> @offset:Nat -> @remaining:Nat -> @actual_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> @root_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> IndexPageData
type IndexMeta source · line 73 · raw
Type
Holds only footer fields required after index traversal completes.
IndexMeta@total:U32 -> @index_length:U32 -> @expected_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> IndexMeta
type RouteContext source · line 77 · raw
Data
Carries the owned reader through positional separator search states.
RouteContext@size:Nat -> @index_offset:Nat -> @block_count:Nat -> RouteContext
type RouteState source · line 81 · raw
Type
Carries each positional read through the separator-search state machine.
RouteNeed@file:File -> @state:State -> @context:RouteContext -> @key:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @search:0x7586b743ff7fd05e412d5115859629b6/src/scan/BlockRoutePolicy.Search -> RouteState
RouteSelect@reader:Reader -> @block:Nat -> RouteState
RouteRecordRead@pair:Pair(File, Result<&1, &1, Pair(U32, String), 0x7586b743ff7fd05e412d5115859629b6/src/SstStreamIo.ExactResult>) -> @state:State -> @context:RouteContext -> @key:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @search:0x7586b743ff7fd05e412d5115859629b6/src/scan/BlockRoutePolicy.Search -> @mid:Nat -> RouteState
RouteSeparatorNeed@file:File -> @state:State -> @context:RouteContext -> @key:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @search:0x7586b743ff7fd05e412d5115859629b6/src/scan/BlockRoutePolicy.Search -> @mid:Nat -> @offset:Nat -> @length:U32 -> @separator_start:Nat -> RouteState
RouteSeparatorRead@pair:Pair(File, Result<&1, &1, Pair(U32, String), 0x7586b743ff7fd05e412d5115859629b6/src/SstStreamIo.ExactResult>) -> @state:State -> @context:RouteContext -> @key:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @search:0x7586b743ff7fd05e412d5115859629b6/src/scan/BlockRoutePolicy.Search -> @mid:Nat -> RouteState
RouteCompare@file:File -> @state:State -> @context:RouteContext -> @key:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @search:0x7586b743ff7fd05e412d5115859629b6/src/scan/BlockRoutePolicy.Search -> @mid:Nat -> @separator:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> RouteState
RouteFailed@file:File -> @error:Pair(U32, String) -> RouteState
Definitions
def transition.budget.state source · line 99 · raw
@file:File -> @state:State -> Pair(Nat, Reader)
Computes enough transitions to visit blocks and stream their index pages.
def transition_budget source · line 112 · raw
@reader:Reader -> Pair(Nat, Reader)
Returns the block traversal budget while preserving the owned reader.
def metadata source · line 117 · raw
@reader:Reader -> Pair(Metadata, Reader)
Returns compact file metadata while preserving the owned reader.
def bytes.slice.result source · line 129 · raw
@pair:Pair(0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes, 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes) -> 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes
def block.checksum.compare source · line 133 · raw
@comparison:Pair(0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes, Pair(0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes, Bool)) -> Bool
def block.checksum.valid.copies source · line 139 · raw
@copies:Pair(0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes, 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes) -> @+payload_length:U32 -> Bool
def block.checksum.valid source · line 150 · raw
@block:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @+payload_length:U32 -> Bool
def read_at.exact.complete source · line 156 · raw
@bytes:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @lengths:Pair(Nat, Nat) -> @needed:U32 -> Result<&1, &1, Pair(U32, String), 0x7586b743ff7fd05e412d5115859629b6/src/SstStreamIo.ExactResult>
def read_at.exact.length source · line 166 · raw
@needed:U32 -> @copies:Pair(0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes, 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes) -> Result<&1, &1, Pair(U32, String), 0x7586b743ff7fd05e412d5115859629b6/src/SstStreamIo.ExactResult>
def read_at.exact.bytes source · line 177 · raw
@needed:U32 -> @result:Result<&1, &1, Pair(U32, String), 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes> -> Result<&1, &1, Pair(U32, String), 0x7586b743ff7fd05e412d5115859629b6/src/SstStreamIo.ExactResult>
def read_at.exact.pair source · line 186 · raw
@needed:U32 -> @pair:Pair(File, Result<&1, &1, Pair(U32, String), 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes>) -> Pair(File, Result<&1, &1, Pair(U32, String), 0x7586b743ff7fd05e412d5115859629b6/src/SstStreamIo.ExactResult>)
def corruption source · line 194 · raw
@message:String -> Pair(U32, String)
Maps malformed SST content to the storage corruption domain.
def resource_limit_error_code source · line 198 · raw
U32
Identifies the explicit resident index budget failure to the public API.
def resource_limit source · line 202 · raw
@message:String -> Pair(U32, String)
Returns a typed host error for an index larger than the resident budget.
def codec.error source · line 205 · raw
@error:0x7586b743ff7fd05e412d5115859629b6/src/ByteSstFile.Error -> Pair(U32, String)
def close.failed source · line 214 · raw
@file:File -> @error:Pair(U32, String) -> IO(Result<&1, &1, Pair(U32, String), Step>)
def open.failed source · line 222 · raw
@file:File -> @error:Pair(U32, String) -> IO(Result<&1, &1, Pair(U32, String), Reader>)
def open.hash.index source · line 230 · raw
@file:File -> @+size:Nat -> @header:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @total:U32 -> @block_count:U32 -> @index_offset:Nat -> @root_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> @result:Result<&1, &1, 0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.StreamError, 0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream> -> IO(Result<&1, &1, Pair(U32, String), Reader>)
def open.hash.root source · line 248 · raw
@file:File -> @+size:Nat -> @header:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @total:U32 -> @counts:Pair(Nat, Nat) -> @index_offset:Nat -> @result:Result<&1, &1, 0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.StreamError, 0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream> -> IO(Result<&1, &1, Pair(U32, String), Reader>)
def open.hash.header source · line 269 · raw
@file:File -> @+size:Nat -> @copies:Pair(0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes, 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes) -> @total:U32 -> @block_count:U32 -> @index_offset:Nat -> IO(Result<&1, &1, Pair(U32, String), Reader>)
def open.hashes source · line 283 · raw
@file:File -> @+size:Nat -> @header:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @total:U32 -> @block_count:U32 -> @index_offset:Nat -> IO(Result<&1, &1, Pair(U32, String), Reader>)
def open.header.index source · line 294 · raw
@file:File -> @+size:Nat -> @header:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @total:U32 -> @block_count:U32 -> @index_offset:Nat -> @valid:Bool -> IO(Result<&1, &1, Pair(U32, String), Reader>)
def open.header.index.length.decoded source · line 309 · raw
@file:File -> @+size:Nat -> @header:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @total:U32 -> @block_count:U32 -> @+block_count_nat:U32 -> @result:Pair(0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes, Maybe<&2, U32>) -> IO(Result<&1, &1, Pair(U32, String), Reader>)
def open.header.index.length.bytes source · line 332 · raw
@file:File -> @+size:Nat -> @header:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @total:U32 -> @block_count:U32 -> @block_count_nat:U32 -> @result:Result<&1, &1, Pair(U32, String), 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes> -> IO(Result<&1, &1, Pair(U32, String), Reader>)
def open.header.index.length.exact source · line 347 · raw
@pair:Pair(File, Result<&1, &1, Pair(U32, String), 0x7586b743ff7fd05e412d5115859629b6/src/SstStreamIo.ExactResult>) -> @+size:Nat -> @header:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @total:U32 -> @block_count:U32 -> @block_count_nat:U32 -> IO(Result<&1, &1, Pair(U32, String), Reader>)
def open.header.index.counts source · line 365 · raw
@file:File -> @+size:Nat -> @header:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @total:U32 -> @counts:Pair(Nat, Nat) -> IO(Result<&1, &1, Pair(U32, String), Reader>)
def open.header.valid source · line 381 · raw
@file:File -> @+size:Nat -> @header:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @total:U32 -> @block_count:U32 -> @size_valid:Bool -> IO(Result<&1, &1, Pair(U32, String), Reader>)
def open.header.parsed source · line 396 · raw
@file:File -> @+size:Nat -> @result:Result<&1, &1, 0x7586b743ff7fd05e412d5115859629b6/src/ByteSstFile.Error, 0x7586b743ff7fd05e412d5115859629b6/src/ByteSstFile.MultiHeader> -> IO(Result<&1, &1, Pair(U32, String), Reader>)
def open.header.result source · line 408 · raw
@file:File -> @+size:Nat -> @result:Result<&1, &1, Pair(U32, String), 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes> -> IO(Result<&1, &1, Pair(U32, String), Reader>)
def open.header.read source · line 419 · raw
@+size:Nat -> @pair:Pair(File, Result<&1, &1, Pair(U32, String), 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes>) -> IO(Result<&1, &1, Pair(U32, String), Reader>)
def open.header.pair source · line 427 · raw
@+size:Nat -> @pair:Pair(File, Result<&1, &1, Pair(U32, String), 0x7586b743ff7fd05e412d5115859629b6/src/SstStreamIo.ExactResult>) -> IO(Result<&1, &1, Pair(U32, String), Reader>)
def open.file source · line 433 · raw
@+size:Nat -> @opened:Result<&1, &1, Pair(U32, String), File> -> IO(Result<&1, &1, Pair(U32, String), Reader>)
def open.sized.valid source · line 446 · raw
@+path:String -> @+size:Nat -> @valid:Bool -> IO(Result<&1, &1, Pair(U32, String), Reader>)
def open.sized source · line 461 · raw
@+path:String -> @result:Result<&1, &1, Pair(U32, String), Nat> -> IO(Result<&1, &1, Pair(U32, String), Reader>)
def open source · line 471 · raw
@+path:String -> IO(Result<&1, &1, Pair(U32, String), Reader>)
Opens a generation-four SST and validates its bounded header metadata.
def seek.block.invalid source · line 476 · raw
@file:File -> IO(Result<&1, &1, Pair(U32, String), Reader>)
def seek.block.construct source · line 481 · raw
@file:File -> @size:Nat -> @header:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @index_offset:Nat -> @total:U32 -> @block_count:U32 -> @root_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> @index_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> @index:U32 -> @offset:U32 -> @valid:Bool -> IO(Result<&1, &1, Pair(U32, String), Reader>)
def seek.block.ready source · line 502 · raw
@file:File -> @state:State -> @index:U32 -> @offset:U32 -> @valid:Bool -> IO(Result<&1, &1, Pair(U32, String), Reader>)
def seek.block.decoded.offsets source · line 515 · raw
@state:State -> @index:U32 -> @file:File -> @index_offset:Nat -> @offsets:Pair(Maybe<&2, U32>, Maybe<&2, U32>) -> IO(Result<&1, &1, Pair(U32, String), Reader>)
def seek.block.decoded source · line 530 · raw
@state:State -> @index:U32 -> @file:File -> @offsets:Pair(Maybe<&2, U32>, Maybe<&2, U32>) -> IO(Result<&1, &1, Pair(U32, String), Reader>)
def seek.block.word source · line 540 · raw
@pair:Pair(0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes, Maybe<&2, U32>) -> Maybe<&2, U32>
def seek.block.words.copies source · line 544 · raw
@pair:Pair(0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes, 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes) -> Pair(Maybe<&2, U32>, Maybe<&2, U32>)
def seek.block.words source · line 552 · raw
@bytes:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> Pair(Maybe<&2, U32>, Maybe<&2, U32>)
def seek.block.read source · line 555 · raw
@state:State -> @index:U32 -> @pair:Pair(File, Result<&1, &1, Pair(U32, String), 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes>) -> IO(Result<&1, &1, Pair(U32, String), Reader>)
def seek.block.indices.quad.first source · line 565 · raw
@firsts:Pair(Nat, Nat) -> @second:Nat -> @third:Nat -> Pair(U32, Pair(U32, Pair(U32, U32)))
def seek.block.indices.quad.result source · line 575 · raw
@triple:Pair(Nat, Pair(Nat, Nat)) -> Pair(U32, Pair(U32, Pair(U32, U32)))
def seek.block.indices.quad source · line 583 · raw
@value:U32 -> Pair(U32, Pair(U32, Pair(U32, U32)))
def seek.block.u32.clone.pair.result source · line 586 · raw
@pair:Pair(Nat, Nat) -> Pair(U32, U32)
def seek.block.u32.clone.pair source · line 590 · raw
@value:U32 -> Pair(U32, U32)
def seek.block.index.read source · line 593 · raw
@file:File -> @state:State -> @index_offset:Nat -> @indices:Pair(U32, U32) -> IO(Result<&1, &1, Pair(U32, String), Reader>)
def seek.block.offsets source · line 609 · raw
@file:File -> @size:Nat -> @header:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @offsets:Pair(Nat, Nat) -> @total:U32 -> @block_count:U32 -> @root_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> @index_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> @indices:Pair(U32, Pair(U32, U32)) -> @valid:Bool -> IO(Result<&1, &1, Pair(U32, String), Reader>)
def seek.block.validated source · line 633 · raw
@file:File -> @size:Nat -> @header:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @index_offset:Nat -> @total:U32 -> @block_count:U32 -> @root_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> @index_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> @indices:Pair(U32, Pair(U32, U32)) -> @valid:Bool -> IO(Result<&1, &1, Pair(U32, String), Reader>)
def seek.block.checked.bounds source · line 648 · raw
@file:File -> @size:Nat -> @header:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @index_offset:Nat -> @total:U32 -> @block_counts:Pair(U32, U32) -> @root_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> @index_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> @indices:Pair(U32, Pair(U32, Pair(U32, U32))) -> IO(Result<&1, &1, Pair(U32, String), Reader>)
def seek.block.checked.indices.ready source · line 669 · raw
@file:File -> @size:Nat -> @header:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @index_offset:Nat -> @total:U32 -> @root_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> @index_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> @indices:Pair(U32, Pair(U32, Pair(U32, U32))) -> @block_count:U32 -> IO(Result<&1, &1, Pair(U32, String), Reader>)
def seek.block.checked.indices source · line 686 · raw
@file:File -> @size:Nat -> @header:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @index_offset:Nat -> @total:U32 -> @block_count:U32 -> @root_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> @index_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> @indices:Pair(U32, Pair(U32, Pair(U32, U32))) -> IO(Result<&1, &1, Pair(U32, String), Reader>)
def seek.block.checked source · line 702 · raw
@file:File -> @state:State -> @indices:Pair(U32, Pair(U32, Pair(U32, U32))) -> IO(Result<&1, &1, Pair(U32, String), Reader>)
def seek_block_after_validation source · line 714 · raw
@reader:Reader -> @index:U32 -> IO(Result<&1, &1, Pair(U32, String), Reader>)
Positions within an SST whose complete index and root were validated by an earlier pass.
def close source · line 723 · raw
@reader:Reader -> IO(Result<&1, &1, Pair(U32, String), Unit>)
Closes the file owned by a reader that has not reached its terminal state.
def route.close.failed source · line 730 · raw
@file:File -> @error:Pair(U32, String) -> IO(Result<&1, &1, Pair(U32, String), Reader>)
def route.record.bounds source · line 738 · raw
@file:File -> @state:State -> @+context:RouteContext -> @key:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @+search:0x7586b743ff7fd05e412d5115859629b6/src/scan/BlockRoutePolicy.Search -> @mid:Nat -> @+offset:U32 -> @+length:U32 -> @separator_start:Nat -> @valid:Bool -> RouteState
def route.record.words source · line 757 · raw
@file:File -> @state:State -> @context:RouteContext -> @key:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @search:0x7586b743ff7fd05e412d5115859629b6/src/scan/BlockRoutePolicy.Search -> @mid:Nat -> @words:Pair(Maybe<&2, U32>, Maybe<&2, U32>) -> RouteState
def route.record.slice source · line 782 · raw
@file:File -> @state:State -> @context:RouteContext -> @key:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @search:0x7586b743ff7fd05e412d5115859629b6/src/scan/BlockRoutePolicy.Search -> @mid:Nat -> @pair:Pair(0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes, 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes) -> RouteState
def route.record.parsed source · line 796 · raw
@state:State -> @context:RouteContext -> @key:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @search:0x7586b743ff7fd05e412d5115859629b6/src/scan/BlockRoutePolicy.Search -> @mid:Nat -> @pair:Pair(File, Result<&1, &1, Pair(U32, String), 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes>) -> RouteState
def route.separator.parsed source · line 810 · raw
@state:State -> @context:RouteContext -> @key:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @search:0x7586b743ff7fd05e412d5115859629b6/src/scan/BlockRoutePolicy.Search -> @mid:Nat -> @pair:Pair(File, Result<&1, &1, Pair(U32, String), 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes>) -> RouteState
def route.compare.copies source · line 823 · raw
@file:File -> @state:State -> @context:RouteContext -> @search:0x7586b743ff7fd05e412d5115859629b6/src/scan/BlockRoutePolicy.Search -> @mid:Nat -> @separator:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @copies:Pair(0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes, 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes) -> RouteState
def route.exhausted source · line 838 · raw
@state:RouteState -> IO(Result<&1, &1, Pair(U32, String), Reader>)
def route.midpoint source · line 861 · raw
@search:0x7586b743ff7fd05e412d5115859629b6/src/scan/BlockRoutePolicy.Search -> Nat
def route.need source · line 866 · raw
@file:File -> @state:State -> @+context:RouteContext -> @key:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @+search:0x7586b743ff7fd05e412d5115859629b6/src/scan/BlockRoutePolicy.Search -> @active:Bool -> IO(RouteState)
def route.loop source · line 889 · raw
@fuel:Nat -> @pending:RouteState -> IO(Result<&1, &1, Pair(U32, String), Reader>)
def seek_key_after_validation source · line 922 · raw
@reader:Reader -> @key:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> IO(Result<&1, &1, Pair(U32, String), Reader>)
Routes a lower key to the last block whose separator does not exceed it.
def measure_key_result source · line 941 · raw
@result:Result<&1, &1, 0x7586b743ff7fd05e412d5115859629b6/src/Wal.Error, 0x7586b743ff7fd05e412d5115859629b6/src/ByteWal.ValueMetadata> -> Result<&1, &1, Pair(U32, String), 0x7586b743ff7fd05e412d5115859629b6/src/ByteWal.ValueMetadata>
Handles measure key result.
def measure_key_closed source · line 956 · raw
@file:File -> @result:Result<&1, &1, 0x7586b743ff7fd05e412d5115859629b6/src/Wal.Error, 0x7586b743ff7fd05e412d5115859629b6/src/ByteWal.ValueMetadata> -> IO(Result<&1, &1, Pair(U32, String), 0x7586b743ff7fd05e412d5115859629b6/src/ByteWal.ValueMetadata>)
Handles measure key closed.
def measure_key_body_result source · line 965 · raw
@key:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @pair:Pair(File, Result<&1, &1, Pair(U32, String), 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes>) -> IO(Result<&1, &1, Pair(U32, String), 0x7586b743ff7fd05e412d5115859629b6/src/ByteWal.ValueMetadata>)
Handles measure key body result.
def measure_key_body_read source · line 978 · raw
@+used:Nat -> @key:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @+payload_length:U32 -> @file:File -> IO(Result<&1, &1, Pair(U32, String), 0x7586b743ff7fd05e412d5115859629b6/src/ByteWal.ValueMetadata>)
Handles measure key body read.
def measure_key_bounds source · line 991 · raw
@+index_offset:Nat -> @+used:Nat -> @+payload_length:U32 -> Bool
Handles measure key bounds.
def measure_key_header_valid source · line 1001 · raw
@+_index_offset:Nat -> @+used:Nat -> @key:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @+payload_length:U32 -> @file:File -> @valid:Bool -> IO(Result<&1, &1, Pair(U32, String), 0x7586b743ff7fd05e412d5115859629b6/src/ByteWal.ValueMetadata>)
Handles measure key header valid.
def measure_key_header_length source · line 1017 · raw
@+index_offset:Nat -> @+used:Nat -> @key:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @pair:Pair(0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes, Maybe<&2, U32>) -> @file:File -> IO(Result<&1, &1, Pair(U32, String), 0x7586b743ff7fd05e412d5115859629b6/src/ByteWal.ValueMetadata>)
Handles measure key header length.
def measure_key_header_exact source · line 1034 · raw
@+index_offset:Nat -> @+used:Nat -> @key:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @pair:Pair(File, Result<&1, &1, Pair(U32, String), 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes>) -> IO(Result<&1, &1, Pair(U32, String), 0x7586b743ff7fd05e412d5115859629b6/src/ByteWal.ValueMetadata>)
Handles measure key header exact.
def measure_key_header source · line 1050 · raw
@+index_offset:Nat -> @+used:Nat -> @key:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @pair:Pair(File, Result<&1, &1, Pair(U32, String), 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes>) -> IO(Result<&1, &1, Pair(U32, String), 0x7586b743ff7fd05e412d5115859629b6/src/ByteWal.ValueMetadata>)
Handles measure key header.
def measure.key.block source · line 1059 · raw
@reader:Reader -> @key:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> IO(Result<&1, &1, Pair(U32, String), 0x7586b743ff7fd05e412d5115859629b6/src/ByteWal.ValueMetadata>)
def measure_key_routed source · line 1073 · raw
@key:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @result:Result<&1, &1, Pair(U32, String), Reader> -> IO(Result<&1, &1, Pair(U32, String), 0x7586b743ff7fd05e412d5115859629b6/src/ByteWal.ValueMetadata>)
Handles measure key routed.
def measure_key.route source · line 1083 · raw
@reader:Reader -> @route_key:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @query_key:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> IO(Result<&1, &1, Pair(U32, String), 0x7586b743ff7fd05e412d5115859629b6/src/ByteWal.ValueMetadata>)
def measure_key.copied source · line 1093 · raw
@reader:Reader -> @keys:Pair(0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes, 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes) -> IO(Result<&1, &1, Pair(U32, String), 0x7586b743ff7fd05e412d5115859629b6/src/ByteWal.ValueMetadata>)
def measure_key source · line 1102 · raw
@reader:Reader -> @key:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> IO(Result<&1, &1, Pair(U32, String), 0x7586b743ff7fd05e412d5115859629b6/src/ByteWal.ValueMetadata>)
Handles measure key.
def next.body.output.index.hash source · line 1108 · raw
@file:File -> @+size:Nat -> @header:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @+index_offset:Nat -> @+next_used:Nat -> @total:U32 -> @block_count:U32 -> @next_number:U32 -> @next_decoded:U32 -> @last_key:Maybe<&1, 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes> -> @entries:List<&1, 0x7586b743ff7fd05e412d5115859629b6/src/ByteMemTable.Entry> -> @root_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> @index_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> @selected:Bool -> IO(Result<&1, &1, Pair(U32, String), Step>)
def next.body.output.hash.results source · line 1131 · raw
@file:File -> @+size:Nat -> @header:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @+index_offset:Nat -> @+next_used:Nat -> @total:U32 -> @block_count:U32 -> @next_number:U32 -> @next_decoded:U32 -> @last_key:Maybe<&1, 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes> -> @entries:List<&1, 0x7586b743ff7fd05e412d5115859629b6/src/ByteMemTable.Entry> -> @root_result:Result<&1, &1, 0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.StreamError, 0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream> -> @index_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> @selected:Bool -> IO(Result<&1, &1, Pair(U32, String), Step>)
def next.body.output.hashes source · line 1156 · raw
@file:File -> @+size:Nat -> @header:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @+index_offset:Nat -> @+next_used:Nat -> @total:U32 -> @block_count:U32 -> @next_number:U32 -> @next_decoded:U32 -> @last_key:Maybe<&1, 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes> -> @entries:List<&1, 0x7586b743ff7fd05e412d5115859629b6/src/ByteMemTable.Entry> -> @checksum:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @root_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> @index_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> @selected:Bool -> IO(Result<&1, &1, Pair(U32, String), Step>)
def next.body.output.count source · line 1178 · raw
@file:File -> @+size:Nat -> @header:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @+index_offset:Nat -> @+used:Nat -> @total:U32 -> @block_count:U32 -> @next_block:U32 -> @decoded:U32 -> @root_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> @index_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> @block_bytes:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @+payload_length:U32 -> @entry_count:U32 -> @entries:List<&1, 0x7586b743ff7fd05e412d5115859629b6/src/ByteMemTable.Entry> -> @last_key:Maybe<&1, 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes> -> @valid:Bool -> @selected:Bool -> IO(Result<&1, &1, Pair(U32, String), Step>)
def next.body.output.order source · line 1213 · raw
@file:File -> @+size:Nat -> @header:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @+index_offset:Nat -> @+used:Nat -> @total:U32 -> @block_count:U32 -> @next_block:U32 -> @decoded:U32 -> @root_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> @index_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> @block_bytes:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @+payload_length:U32 -> @raw_count:Nat -> @entries:List<&1, 0x7586b743ff7fd05e412d5115859629b6/src/ByteMemTable.Entry> -> @order:0x7586b743ff7fd05e412d5115859629b6/src/scan/BlockOrder.State -> @selected:Bool -> IO(Result<&1, &1, Pair(U32, String), Step>)
def next.body.output source · line 1240 · raw
@file:File -> @state:State -> @block_bytes:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @+payload_length:U32 -> @raw_count:Nat -> @copies:Pair(List<&1, 0x7586b743ff7fd05e412d5115859629b6/src/ByteMemTable.Entry>, List<&1, 0x7586b743ff7fd05e412d5115859629b6/src/ByteMemTable.Entry>) -> IO(Result<&1, &1, Pair(U32, String), Step>)
def next.body.ordered source · line 1259 · raw
@file:File -> @state:State -> @block_bytes:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @+payload_length:U32 -> @measured:Pair(List<&1, 0x7586b743ff7fd05e412d5115859629b6/src/ByteMemTable.Entry>, Nat) -> IO(Result<&1, &1, Pair(U32, String), Step>)
def next.body.parsed source · line 1272 · raw
@file:File -> @state:State -> @block_bytes:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @+payload_length:U32 -> @valid_checksum:Bool -> @result:Result<&1, &1, 0x7586b743ff7fd05e412d5115859629b6/src/ByteSstFile.Error, 0x7586b743ff7fd05e412d5115859629b6/src/ByteMemTable.Table> -> IO(Result<&1, &1, Pair(U32, String), Step>)
def next.body.copies.checked source · line 1291 · raw
@file:File -> @state:State -> @block_bytes:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @+payload_length:U32 -> @copies:Pair(0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes, 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes) -> IO(Result<&1, &1, Pair(U32, String), Step>)
def next.body.copies source · line 1304 · raw
@file:File -> @state:State -> @+payload_length:U32 -> @copies:Pair(0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes, 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes) -> IO(Result<&1, &1, Pair(U32, String), Step>)
def next.body.exact source · line 1315 · raw
@context:BodyContext -> @pair:Pair(File, Result<&1, &1, Pair(U32, String), 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes>) -> IO(Result<&1, &1, Pair(U32, String), Step>)
def next.body.result source · line 1328 · raw
@context:BodyContext -> @pair:Pair(File, Result<&1, &1, Pair(U32, String), 0x7586b743ff7fd05e412d5115859629b6/src/SstStreamIo.ExactResult>) -> IO(Result<&1, &1, Pair(U32, String), Step>)
def next.body.valid source · line 1339 · raw
@file:File -> @state:State -> @block_header:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @+used:Nat -> @+payload_length:U32 -> @valid:Bool -> IO(Result<&1, &1, Pair(U32, String), Step>)
def next.block.length.state source · line 1359 · raw
@file:File -> @state:State -> @block_header:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @+payload_length:U32 -> IO(Result<&1, &1, Pair(U32, String), Step>)
def next.block.length source · line 1374 · raw
@file:File -> @state:State -> @block_header:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @result:Pair(0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes, Maybe<&2, U32>) -> IO(Result<&1, &1, Pair(U32, String), Step>)
def next.block.header.copies source · line 1385 · raw
@file:File -> @state:State -> @copies:Pair(0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes, 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes) -> IO(Result<&1, &1, Pair(U32, String), Step>)
def next.block.header source · line 1394 · raw
@file:File -> @state:State -> @result:Result<&1, &1, Pair(U32, String), 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes> -> IO(Result<&1, &1, Pair(U32, String), Step>)
def next.block.header.bytes source · line 1405 · raw
@state:State -> @pair:Pair(File, Result<&1, &1, Pair(U32, String), 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes>) -> IO(Result<&1, &1, Pair(U32, String), Step>)
def next.block.header.pair source · line 1413 · raw
@state:State -> @pair:Pair(File, Result<&1, &1, Pair(U32, String), 0x7586b743ff7fd05e412d5115859629b6/src/SstStreamIo.ExactResult>) -> IO(Result<&1, &1, Pair(U32, String), Step>)
def next.block.read source · line 1420 · raw
@file:File -> @state:State -> IO(Result<&1, &1, Pair(U32, String), Step>)
def next.trailer.finish.root.compare source · line 1458 · raw
@file:File -> @footer:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @copies:Pair(0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes, 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes) -> IO(Result<&1, &1, Pair(U32, String), Step>)
def next.trailer.finish.root.expected source · line 1468 · raw
@file:File -> @footer:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @expected:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> IO(Result<&1, &1, Pair(U32, String), Step>)
def next.trailer.finish.root.digest source · line 1477 · raw
@file:File -> @+total:U32 -> @+index_length:U32 -> @footer:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @digest:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> IO(Result<&1, &1, Pair(U32, String), Step>)
def index.page.decode.root source · line 1539 · raw
@reader:IndexMeta -> @+offset:Nat -> @+remaining:Nat -> @actual_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> @root_result:Result<&1, &1, 0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.StreamError, 0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream> -> Result<&1, &1, Pair(U32, String), IndexPageData>
def index.page.decode.actual source · line 1554 · raw
@reader:IndexMeta -> @+offset:Nat -> @+remaining:Nat -> @root_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> @actual_result:Result<&1, &1, 0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.StreamError, 0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream> -> @for_root:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> Result<&1, &1, Pair(U32, String), IndexPageData>
def index.page.decode.copies source · line 1569 · raw
@reader:IndexMeta -> @+offset:Nat -> @+remaining:Nat -> @actual_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> @root_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> @copies:Pair(0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes, 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes) -> @complete:Bool -> Result<&1, &1, Pair(U32, String), IndexPageData>
def index.page.decode source · line 1586 · raw
@reader:IndexMeta -> @+offset:Nat -> @+remaining:Nat -> @actual_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> @root_hash:0x7586b743ff7fd05e412d5115859629b6/src/hub_sha/sha256.Stream -> @bytes:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> @complete:Bool -> Result<&1, &1, Pair(U32, String), IndexPageData>
def index.page.loop source · line 1598 · raw
@fuel:Nat -> @state:IndexPageState -> IO(Result<&1, &1, Pair(U32, String), Step>)
def index.page.start source · line 1643 · raw
@file:File -> @state:State -> IO(Result<&1, &1, Pair(U32, String), Step>)
def next.trailer.read source · line 1656 · raw
@file:File -> @state:State -> IO(Result<&1, &1, Pair(U32, String), Step>)
def next.trailer.ready source · line 1662 · raw
@file:File -> @state:State -> @valid:Bool -> IO(Result<&1, &1, Pair(U32, String), Step>)
def next.selected.end source · line 1673 · raw
@file:File -> IO(Result<&1, &1, Pair(U32, String), Step>)
def next.trailer.state source · line 1678 · raw
@file:File -> @state:State -> IO(Result<&1, &1, Pair(U32, String), Step>)
def next.state.block.finished source · line 1688 · raw
@file:File -> @state:State -> @finished:Bool -> IO(Result<&1, &1, Pair(U32, String), Step>)
def next.state.block source · line 1699 · raw
@file:File -> @state:State -> IO(Result<&1, &1, Pair(U32, String), Step>)
def next.state source · line 1708 · raw
@reader:Reader -> IO(Result<&1, &1, Pair(U32, String), Step>)
def next source · line 1713 · raw
@reader:Reader -> IO(Result<&1, &1, Pair(U32, String), Step>)
Reads one bounded block or validates the trailer and returns End.
def entry.open source · line 1717 · raw
@reader:Reader -> EntryCursor
Starts incremental entry consumption from an open block reader.
def entry.ready source · line 1720 · raw
@reader:Reader -> @entries:List<&1, 0x7586b743ff7fd05e412d5115859629b6/src/ByteMemTable.Entry> -> EntryStep
def entry.result source · line 1729 · raw
@result:Result<&1, &1, Pair(U32, String), Step> -> IO(EntryStep)
def entry.next source · line 1741 · raw
@cursor:EntryCursor -> IO(EntryStep)
Returns one entry and reads another SST block only when the current block is empty.
def entry.close source · line 1758 · raw
@cursor:EntryCursor -> IO(Result<&1, &1, Pair(U32, String), Unit>)
Closes the active SST reader and preserves terminal cursor states.