aboutsummaryrefslogtreecommitdiff
path: root/mingling
diff options
context:
space:
mode:
Diffstat (limited to 'mingling')
-rw-r--r--mingling/src/example_docs.rs6
-rw-r--r--mingling/src/gen_program.rs5
2 files changed, 11 insertions, 0 deletions
diff --git a/mingling/src/example_docs.rs b/mingling/src/example_docs.rs
index e3b9db6..e61551b 100644
--- a/mingling/src/example_docs.rs
+++ b/mingling/src/example_docs.rs
@@ -2064,6 +2064,7 @@ pub mod example_lazy_resources {}
/// pub desc: String,
/// }
///
+/// // --------- IMPORTANT ---------
/// /// Attach a `Description` to `EntryGreet`.
/// ///
/// /// - `BindType` = `EntryGreet` (the enum variant / entry type)
@@ -2074,6 +2075,7 @@ pub mod example_lazy_resources {}
/// desc: "ok".to_string(),
/// }
/// }
+/// // --------- IMPORTANT ---------
///
/// pack!(ResultName = String);
/// pack!(DescResult = String);
@@ -2094,10 +2096,12 @@ pub mod example_lazy_resources {}
/// #[chain]
/// fn handle_desc(_args: EntryDescription) -> Next {
/// use mingling::ProgramCollect;
+/// // --------- IMPORTANT ---------
/// let msg = match ThisProgram::get_metadata::<Description>(ThisProgram::EntryGreet) {
/// Some(d) => format!("EntryGreet desc = {}", d.desc),
/// None => "EntryGreet has no description".to_string(),
/// };
+/// // --------- IMPORTANT ---------
/// DescResult::new(msg).to_render()
/// }
///
@@ -2105,10 +2109,12 @@ pub mod example_lazy_resources {}
/// #[chain]
/// fn handle_nodoc(_args: EntryNoDescription) -> Next {
/// use mingling::ProgramCollect;
+/// // --------- IMPORTANT ---------
/// let msg = match ThisProgram::get_metadata::<Description>(ThisProgram::EntryDescription) {
/// Some(d) => format!("EntryDescription desc = {}", d.desc),
/// None => "EntryDescription has no description".to_string(),
/// };
+/// // --------- IMPORTANT ---------
/// DescResult::new(msg).to_render()
/// }
///
diff --git a/mingling/src/gen_program.rs b/mingling/src/gen_program.rs
index a3b7e29..ef32074 100644
--- a/mingling/src/gen_program.rs
+++ b/mingling/src/gen_program.rs
@@ -212,6 +212,11 @@ impl ProgramCollect for ThisProgram {
todo!()
}
+ fn get_metadata<T: 'static>(member_id: Self::Enum) -> Option<T> {
+ let _ = member_id;
+ todo!()
+ }
+
#[cfg(feature = "async")]
fn do_chain(
_any: mingling_core::AnyOutput<Self::Enum>,