Core LibraryunreleasedAPI Reference

Choose documentation 1

latest

Current version

latest
English

Unreleased libtmux_erlang has not been released. Its API may change during development. This site's structure and URLs may change too.

function libtmux-erlang latest

tmux_model:new/2

Construct a detached row from validated observations.

Source and package
Qualified name
tmux_model:new/2
Declared in
tmux_model
Package
libtmux_erlang
Source
apps/libtmux_erlang/src/tmux_model.erl
new(Entity, Fields) -spec new(atom(), map()) -> {ok, row()} | {error, tmux_schema:error_detail()}.

Description#

Accepts dynamic maps, including malformed input that returns a tagged tmux_schema:error_detail/0. For trusted typed code, prefer the entity constructors such as pane/1 and pane_input/0.

Examples#

1> {ok, Pane} = tmux_model:new(pane, #{id => <<"%1">>, width => 120}), ok.
ok
2> tmux_model:get(width, Pane).
120
Parameters

Guides#

Pages that discuss new/2.

Esc

Type to search.

Reference previewOpen reference