File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 44/// generates code which implements many useful traits, including the ones needed to work with
55/// [`diesel`].
66///
7- /// The generated structs do not expose any method or trait to create an arbitrary instance, in
7+ /// The generated structs do not expose any method or trait to create an arbitrary instance[^See note] , in
88/// order to provide the guarantee that the `UUID` is valid. However, it is possible to choose to
99/// add traits and methods to customize the behavior.
10- ///
1110#[ cfg_attr(
1211 not( feature = "example-generated" ) ,
1312 doc = "To see the documentation of a generated typed `UUID`, consider re-building the \
4847/// }
4948/// ```
5049///
51- /// Keep in mind that there is no way to construct an instance unless the instantiation is done
50+ /// Keep in mind that there is no way[^See note] to construct an instance unless the instantiation is done
5251/// inside the module containing the new type or a submodule of it:
5352///
5453/// ```compile_fail,E0603
6261/// let foo = inner::Foo(Uuid::default());
6362/// // ^^^ private tuple struct constructor
6463/// ```
64+ ///
65+ /// [^See note]: There is no way in normal usage to construct an instance. The exception is with the
66+ /// `new_unchecked` method, which is intended for special cases, such as testing.
6567#[ macro_export]
6668macro_rules! typed_uuid {
6769 (
You can’t perform that action at this time.
0 commit comments