Debian Codegraph @

.cargo/vendor/wit-bindgen/src/examples.rs

raw
1 //! Examples of output of the [`generate!`] macro.
2 //!
3 //! This module is only included in docs.rs documentation and is not present in
4 //! the actual crate when compiling from crates.io. The purpose of this module
5 //! is to showcase what the output of the [`generate!`] macro looks like.
6 //!
7 //! [`generate!`]: crate::generate
8
9 /// An example of generated bindings for top-level imported functions and
10 /// interfaces into a world.
11 ///
12 /// The code used to generate this module is:
13 ///
14 /// ```rust
15 #[doc = include_str!("./examples/_0_world_imports.rs")]
16 /// ```
17 pub mod _0_world_imports;
18
19 /// An example of importing interfaces into a world.
20 ///
21 /// The code used to generate this module is:
22 ///
23 /// ```rust
24 #[doc = include_str!("./examples/_1_interface_imports.rs")]
25 /// ```
26 pub mod _1_interface_imports;
27
28 /// An example of importing resources into a world.
29 ///
30 /// The code used to generate this module is:
31 ///
32 /// ```rust
33 #[doc = include_str!("./examples/_2_imported_resources.rs")]
34 /// ```
35 pub mod _2_imported_resources;
36
37 /// An example of exporting items from a world and the traits that they
38 /// generate.
39 ///
40 /// The code used to generate this module is:
41 ///
42 /// ```rust
43 #[doc = include_str!("./examples/_3_world_exports.rs")]
44 /// ```
45 pub mod _3_world_exports;
46
47 /// An example of exporting resources from a world and the traits that they
48 /// generate.
49 ///
50 /// The code used to generate this module is:
51 ///
52 /// ```rust
53 #[doc = include_str!("./examples/_4_exported_resources.rs")]
54 /// ```
55 pub mod _4_exported_resources;