jacquard_api/
builder_types.rs

1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// This file was automatically generated from Lexicon schemas.
4// Any manual changes will be overwritten on the next regeneration.
5
6/// Marker type indicating a builder field has been set
7pub struct Set<T>(pub T);
8impl<T> Set<T> {
9    /// Extract the inner value
10    #[inline]
11    pub fn into_inner(self) -> T {
12        self.0
13    }
14}
15
16/// Marker type indicating a builder field has not been set
17pub struct Unset;
18/// Trait indicating a builder field is set (has a value)
19#[rustversion::attr(
20    since(1.78.0),
21    diagnostic::on_unimplemented(
22        message = "the field `{Self}` was not set, but this method requires it to be set",
23        label = "the field `{Self}` was not set"
24    )
25)]
26pub trait IsSet: private::Sealed {}
27/// Trait indicating a builder field is unset (no value yet)
28#[rustversion::attr(
29    since(1.78.0),
30    diagnostic::on_unimplemented(
31        message = "the field `{Self}` was already set, but this method requires it to be unset",
32        label = "the field `{Self}` was already set"
33    )
34)]
35pub trait IsUnset: private::Sealed {}
36impl<T> IsSet for Set<T> {}
37impl IsUnset for Unset {}
38mod private {
39    /// Sealed trait to prevent external implementations
40    pub trait Sealed {}
41    impl<T> Sealed for super::Set<T> {}
42    impl Sealed for super::Unset {}
43}