CRAM.Handle (cram v0.1.0)

Copy Markdown View Source

An open CRAM source.

The handle owns the file descriptor. Callers use CRAM.open/2 and CRAM.close/1. Reads after close return {:error, %CRAM.Error{reason: :closed}}. The functions here are the process API used by CRAM, not the supported caller API.

Summary

Types

t()

An open file owned by a process.

Functions

Returns a specification to start this module under a supervisor.

Types

t()

@type t() :: %CRAM.Handle{pid: pid()}

An open file owned by a process.

  • :pid — the process that holds the descriptor

Call CRAM.open/2 and CRAM.close/1. The functions on this module are the process API.

iex> %CRAM.Handle{pid: self()} |> then(&(&1.pid == self()))
true

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.