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#[jacquard_common::deps::codegen::rustversion::attr(
21 since(1.78.0),
22 diagnostic::on_unimplemented(
23 message = "the field `{Self}` was not set, but this method requires it to be set",
24 label = "the field `{Self}` was not set"
25 )
26)]
27pub trait IsSet: private::Sealed {}
28#[jacquard_common::deps::codegen::rustversion::attr(
31 since(1.78.0),
32 diagnostic::on_unimplemented(
33 message = "the field `{Self}` was already set, but this method requires it to be unset",
34 label = "the field `{Self}` was already set"
35 )
36)]
37pub trait IsUnset: private::Sealed {}
38impl<T> IsSet for Set<T> {}
39impl IsUnset for Unset {}
40mod private {
41 pub trait Sealed {}
43 impl<T> Sealed for super::Set<T> {}
44 impl Sealed for super::Unset {}
45}