jacquard_api/
builder_types.rs1pub struct Set<T>(pub T);
8impl<T> Set<T> {
9 #[inline]
11 pub fn into_inner(self) -> T {
12 self.0
13 }
14}
15
16pub struct Unset;
18#[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#[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 pub trait Sealed {}
41 impl<T> Sealed for super::Set<T> {}
42 impl Sealed for super::Unset {}
43}