AutoApi.SetCommand.new
You're seeing just the function
new
, go back to AutoApi.SetCommand module for more information.
Specs
new(AutoApi.State.t()) :: t()
Creates a new SetCommand structure with the given state
.
The capability
module is derived from the given state structure.
Example
iex> state = %AutoApi.TrunkState{lock: %AutoApi.Property{data: :locked}}
iex> Elixir.AutoApi.SetCommand.new(state)
%Elixir.AutoApi.SetCommand{capability: AutoApi.TrunkCapability, state: %AutoApi.TrunkState{lock: %AutoApi.Property{data: :locked}}, version: 13}
Specs
new(AutoApi.Capability.t(), AutoApi.State.t()) :: t()
Creates a new SetCommand structure with the given capability
and state
.
Example
iex> capability = AutoApi.TrunkCapability
iex> state = %AutoApi.TrunkState{lock: %AutoApi.Property{data: :locked}}
iex> Elixir.AutoApi.SetCommand.new(capability, state)
%Elixir.AutoApi.SetCommand{capability: AutoApi.TrunkCapability, state: %AutoApi.TrunkState{lock: %AutoApi.Property{data: :locked}}, version: 13}