Behaviours: riakc_datatype.
enable
or disable
)
is captured for later application in Riak. Note that it is
possible to enable
a flag that is already true
and disable
a
flag that is already false
. Flags are only available as values in
maps.
abstract datatype: flag()
flag_op() = enable | disable
disable/1 | Disables the flag, setting its value to false. |
enable/1 | Enables the flag, setting its value to true. |
is_type/1 | Determines whether the passed term is a flag container. |
new/0 | Creates a new, empty flag container type. |
new/1 | Creates a new flag with the passed context. |
new/2 | Creates a new flag with the specified value and context. |
to_op/1 | Extracts an operation from the flag that can be encoded into an update request. |
type/0 | Returns the symbolic name of this container. |
value/1 | Extracts the original value of the flag. |
throws context_required
Disables the flag, setting its value to false.
Enables the flag, setting its value to true.
is_type(T::term()) -> boolean()
Determines whether the passed term is a flag container.
new() -> flag()
Creates a new, empty flag container type.
new(Context::riakc_datatype:context()) -> flag()
Creates a new flag with the passed context.
new(Value::boolean(), Context::riakc_datatype:context()) -> flag()
Creates a new flag with the specified value and context.
to_op(Flag::flag()) -> riakc_datatype:update(flag_op())
Extracts an operation from the flag that can be encoded into an update request.
type() -> atom()
Returns the symbolic name of this container.
value(Flag::flag()) -> boolean()
Extracts the original value of the flag. true is enabled, false is disabled.
Generated by EDoc, Dec 16 2016, 16:38:08.