檢視原始碼 IO.Stream (Elixir v1.16.2)

定義由 IO.stream/2IO.binstream/2 回傳的 IO.Stream 結構。

下列欄位為公開

  • device - IO 裝置
  • raw - 布林值,表示是否應使用 bin 函式
  • line_or_bytes - 如果讀取應讀取行或特定位元組數

值得注意的是,IO 串流有副作用,每次您瀏覽串流時,您可能會得到不同的結果。

摘要

類型

@type t() :: %IO.Stream{
  device: IO.device(),
  line_or_bytes: :line | non_neg_integer(),
  raw: boolean()
}