rafted_value v0.2.0 RaftedValue.Server.State
Summary
Functions
Type-aware getter for command_results
Type-aware setter for command_results
Type-aware getter for config
Type-aware setter for config
Type-aware getter for current_term
Type-aware setter for current_term
Type-aware getter for data
Type-aware setter for data
Type-aware getter for election
Type-aware setter for election
Type-aware getter for leadership
Type-aware setter for leadership
Type-aware getter for logs
Type-aware setter for logs
Type-aware getter for members
Type-aware setter for members
Creates a new instance of Elixir.RaftedValue.Server.State by using the given dict and the default value of each field.
Returns {:ok, valid_struct} or {:error, reason}.
The values in the dict are validated by each field’s validate/1 function
A variant of new/1 which returns t or raise if validation fails.
In other words, new/1 followed by Croma.Result.get!/1
Updates an existing instance of Elixir.RaftedValue.Server.State with the given dict.
The values in the dict are validated by each field’s validate/1 function.
Returns {:ok, valid_struct} or {:error, reason}
A variant of update/2 which returns t or raise if validation fails.
In other words, update/2 followed by Croma.Result.get!/1
Checks that the given dict is valid or not by using each field’s validate/1 function.
Returns {:ok, valid_struct} or {:error, reason}
A variant of validate/1 which returns t or raise if validation fails.
In other words, validate/1 followed by Croma.Result.get!/1
Types
t() :: %RaftedValue.Server.State{command_results: RaftedValue.CommandResults.t, config: RaftedValue.Config.t, current_term: RaftedValue.TermNumber.t, data: Croma.Any.t, election: RaftedValue.Election.t, leadership: Croma.TypeGen.Nilable.RaftedValue.Leadership.t, logs: RaftedValue.Logs.t, members: RaftedValue.Members.t}
Functions
Type-aware getter for command_results.
Type-aware setter for command_results.
Type-aware getter for config.
Type-aware setter for config.
Type-aware getter for current_term.
Type-aware setter for current_term.
Type-aware getter for data.
Type-aware setter for data.
Type-aware getter for election.
Type-aware setter for election.
Type-aware getter for leadership.
Type-aware setter for leadership.
Type-aware getter for logs.
Type-aware setter for logs.
Type-aware getter for members.
Type-aware setter for members.
Creates a new instance of Elixir.RaftedValue.Server.State by using the given dict and the default value of each field.
Returns {:ok, valid_struct} or {:error, reason}.
The values in the dict are validated by each field’s validate/1 function.
A variant of new/1 which returns t or raise if validation fails.
In other words, new/1 followed by Croma.Result.get!/1.
Updates an existing instance of Elixir.RaftedValue.Server.State with the given dict.
The values in the dict are validated by each field’s validate/1 function.
Returns {:ok, valid_struct} or {:error, reason}.
A variant of update/2 which returns t or raise if validation fails.
In other words, update/2 followed by Croma.Result.get!/1.
Checks that the given dict is valid or not by using each field’s validate/1 function.
Returns {:ok, valid_struct} or {:error, reason}.
A variant of validate/1 which returns t or raise if validation fails.
In other words, validate/1 followed by Croma.Result.get!/1.