# `Protox.Scalar`
[🔗](https://github.com/ahamez/protox/blob/main/lib/protox/scalar.ex#L1)

Represents a scalar field in a Protocol Buffer message.

This module defines a struct that holds information about a scalar field,
particularly its default value. Scalar fields are the basic data types
such as integers, floats, booleans, strings.

The default value is used when a field is not present in the encoded message.

# `scalar_default_value_type`

```elixir
@type scalar_default_value_type() ::
  binary() | boolean() | integer() | float() | atom() | nil
```

All the possible types that can be used as a default value for a scalar.

# `t`

```elixir
@type t() :: %Protox.Scalar{default_value: scalar_default_value_type()}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
