rafted_value v0.1.1 RaftedValue.RPC.TimeoutNow

Summary

Functions

Type-aware getter for append_entries_req

Type-aware setter for append_entries_req

Creates a new instance of Elixir.RaftedValue.RPC.TimeoutNow 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.RPC.TimeoutNow 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.RPC.TimeoutNow{append_entries_req: RaftedValue.RPC.AppendEntriesRequest.t}

Functions

append_entries_req(timeout_now)

Specs

append_entries_req(t) :: RaftedValue.RPC.AppendEntriesRequest.t

Type-aware getter for append_entries_req.

append_entries_req(s, field)

Specs

append_entries_req(t, RaftedValue.RPC.AppendEntriesRequest.t) :: t

Type-aware setter for append_entries_req.

new(dict)

Specs

new(Dict.t) :: Croma.Result.t(t)

Creates a new instance of Elixir.RaftedValue.RPC.TimeoutNow 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.

new!(dict)

Specs

new!(Dict.t) :: t

A variant of new/1 which returns t or raise if validation fails. In other words, new/1 followed by Croma.Result.get!/1.

update(s, dict)

Specs

update(t, Dict.t) :: Croma.Result.t(t)

Updates an existing instance of Elixir.RaftedValue.RPC.TimeoutNow 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}.

update!(s, dict)

Specs

update!(t, Dict.t) :: t

A variant of update/2 which returns t or raise if validation fails. In other words, update/2 followed by Croma.Result.get!/1.

validate(dict)

Specs

validate(Dict.t) :: Croma.Result.t(t)

Checks that the given dict is valid or not by using each field’s validate/1 function. Returns {:ok, valid_struct} or {:error, reason}.

validate!(dict)

Specs

validate!(Dict.t) :: t

A variant of validate/1 which returns t or raise if validation fails. In other words, validate/1 followed by Croma.Result.get!/1.