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 aspane/1andpane_input/0.Examples#
1> {ok, Pane} = tmux_model:new(pane, #{id => <<"%1">>, width => 120}), ok.ok2> tmux_model:get(width, Pane).120
Guides#
Pages that discuss new/2.