def text_of_file

mlbend-huggingface@0.1.1.0 · main.bend:150

import mlbend-huggingface@0.1.1.0/main.bend as MlbendHuggingface
import Base
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes

150# The text of a file that may be there.
151def text_of_file(r: Result<&1, &1, Err, Bytes.Bytes>) -> Result<&1, &1, Err, String>:
152  match r:
153    case Fail{e}:
154      Fail{e}
155    case Done{b}:
156      Done{Bytes.to_string(b)}

Uses (5)

Used by (1)