tmux_filter:new/2
Validate criteria or reuse an already normalized filter for the same entity.
Source and package
- Qualified name
-
tmux_filter: new/2 - Declared in
tmux_filter- Package
- libtmux_erlang
- Source
- apps/libtmux_erlang/src/tmux_filter.erl
- new/2 -spec new(tmux
_schema: (), map() | t()) -> {ok, t()} | {error, map()}.entity -
Examples#
1> {ok, F} = tmux_filter:new(pane, #{width => #{gte => 120.0}}), ok.ok2> tmux_filter:new(pane, F) =:= {ok, F}.true3> tmux_filter:new(pane, #{active => #{contains => <<"yes">>}}).{error,#{code => unsupported_operator,path => [active,contains],allowed => [equals,'not',in,not_in]}}