def from_string.preflight
import mylsm-lsm-store@0.6.0.1/src/StorageBytes.bend as StorageBytesimport Base
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes
195def from_string.preflight(+text: String, size: Maybe<&2, U32>) -> Result<&1, &1, U32 & String, Bytes.Bytes>:
196 match size:
197 case None{}:
198 Fail{(2, "record too large")}
199 case Some{len}:
200 Done{from_string.output(text, len)}