Files
luma/Sources/LumaCore/Models/REPLResult.swift
Ole André Vadla Ravnås e711f772e3 Render r2 hexdumps in the hex view widget
Detect the plain px and x commands and fetch their bytes via
pxj, rendering them in our interactive hex view rather than as
text. Resolve the target address so the offset column shows the
real addresses, carrying it on the binary result's metadata.
2026-06-26 19:13:57 +02:00

25 lines
685 B
Swift

import Foundation
public struct REPLResult: Sendable {
public let id: UUID
public let code: String
public let language: REPLLanguage
public let value: Value
public let timestamp: Date
public enum Value: @unchecked Sendable {
case js(JSInspectValue)
case text(String)
case styled(StyledText)
case binary(Data, meta: REPLCell.Result.BinaryMeta?)
}
public init(id: UUID = UUID(), code: String, language: REPLLanguage = .javascript, value: Value, timestamp: Date = .now) {
self.id = id
self.code = code
self.language = language
self.value = value
self.timestamp = timestamp
}
}