|
| constexpr auto | validate_presence () const noexcept -> std::optional< Error > |
| | Check presence requirement.
|
| |
| template<typename T > |
| constexpr auto | set (const T &val) noexcept |
| | Set the value.
|
| |
template<typename T >
requires (!fields::is_string_v<Type> && !IsMessage<Type>) |
| constexpr void | set_without_validation (const T &val) noexcept |
| | Set the value, bypassing validation.
|
| |
| constexpr auto | get () const noexcept |
| | Get the user-facing value.
|
| |
|
constexpr void | clear () noexcept |
| | Clear the field value.
|
| |
| constexpr auto | Validate () const noexcept -> std::optional< Error > |
| | Validate the field value.
|
| |
|
constexpr bool | operator== (const Field &other) const noexcept |
| |
template<FieldId Id, typename PresenceValidator, typename Type>
requires IsPresenceValidator<PresenceValidator>
class Crunch::messages::Field< Id, PresenceValidator, Type >
Wrapper for a message field within a CrunchMessage.
Associates a FieldId and Presence requirements with a data Type.
- Template Parameters
-
| Id | The unique FieldId. |
| PresenceValidator | The presence validation policy (Optional/Required). |
| Type | The underlying field type (Scalar, String, Array, or Message). |