# #tmux_model:session{}

- **Package:** libtmux_erlang
- **Language:** Erlang
- **Kind:** struct
- **Source:** https://github.com/libtmux/libtmux-erlang/blob/d1b6308440cf9eb8f6647e7ae434bce60e849368/apps/libtmux_erlang/src/tmux_model.erl#L48
- **Page:** https://libtmux.org/en/erlang/latest/reference/tmux_model-session/

```
-record #session{id :: session_id(),
                 name =
                     not_loaded ::
                         binary() |
                         not_loaded | unavailable,
                 attached_count =
                     not_loaded ::
                         non_neg_integer() |
                         not_loaded | unavailable,
                 attached =
                     not_loaded ::
                         boolean() |
                         not_loaded | unavailable,
                 created =
                     not_loaded ::
                         non_neg_integer() |
                         not_loaded | unavailable,
                 origin = none :: none | reference(),
                 snapshot_id = none :: none | reference(),
                 model_version = 2 :: pos_integer(),
                 observation =
                     none :: none | observation()}.
```

## In other ports

A tmux session

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Session`](/en/py/latest/reference/libtmux-session/) (class) |
| Ruby | [`LibTmux::Session`](/en/ruby/latest/reference/libtmux-session-nvps/) (class) |
| Lua | [`libtmux.Session`](/en/lua/latest/reference/libtmux-session/) (class) |
| PowerShell | [`LibTmux\Get-TmuxSession`](/en/powershell/latest/reference/libtmux-get-tmuxsession/) (cmdlet). This cmdlet reads and returns shared .NET `LibTmux.Session` objects. Child windows and panes require further acquisition. |
| Julia | [`LibTmux.SessionSnapshot`](/en/julia/latest/reference/libtmux-sessionsnapshot/) (struct). `SessionSnapshot` holds captured session data. Actions use its `SessionRef`, a typed identity bound to an observed daemon generation. |
| Elixir | [`LibTmux.Session`](/en/elixir/latest/reference/libtmux-session/) (struct). `Session` is an immutable observation. Fields not captured read as `:unloaded`. |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| Common Lisp | [`libtmux:session`](/en/lisp/latest/reference/libtmux-session-type/) (class). `session` is an immutable captured entity. The same name also has a relation accessor with a distinct public identity. |
| TypeScript | [`session.Session`](/en/ts/latest/reference/session-session/) (class) |
| Rust | [`session.Session`](/en/rs/latest/reference/session-session/) (struct) |
| Go | [`tmux.Session`](/en/go/latest/reference/tmux-session/) (struct) |
| Java | [`io.github.libtmux.Session`](/en/java/latest/reference/io-github-libtmux-session-session/) (class) |
| Clojure | [`libtmux.core/sessions!`](/en/clojure/latest/reference/libtmux-core-sessions/) (function). Acquires a vector of captured session maps. The session value is a map, not a wrapper class. |
| Kotlin | [`io.github.libtmux.kotlin.Session`](/en/kotlin/latest/reference/io-github-libtmux-kotlin-session/) (class) |
| Scala | [`io.github.libtmux.scaladsl.Session`](/en/scala/latest/reference/io-github-libtmux-scaladsl-session/) (typealias) |
| C# | [`LibTmux.Session`](/en/csharp/latest/reference/libtmux-session/) (class) |
| F# | [`LibTmux.FSharp.Session`](/en/fsharp/latest/reference/libtmux-fsharp-session/) (module). This F# module builds deferred child queries from a shared .NET `LibTmux.Session` and its server association. `Query.list` acquires their results from tmux. |
| C++ | [`libtmux::Session`](/en/cxx/latest/reference/libtmux-session/) (class) |
| Swift | [`Session`](/en/swift/latest/reference/session/) (struct) |
| OCaml | [`Libtmux.Session.t`](/en/ocaml/latest/reference/libtmux-session-t/) (typealias) |
| Perl | [`LibTmux::Session`](/en/perl/latest/reference/libtmux-session/) (class). A captured read-only entity; explicit Server operations accept its stable identity. |
