Initial node implementation #4

Merged
zack merged 51 commits from develop into master 2023-07-19 18:09:13 +00:00
39 changed files with 1177 additions and 44 deletions
Showing only changes of commit 831fc74472 - Show all commits

View File

@ -176,14 +176,14 @@ pub fn poll_variant_macro(input: TokenStream) -> TokenStream {
} }
// ----- Publish struct ---------------------------------- // ----- Publish struct ----------------------------------
//#[cfg(feature = "embassy-sync")] #[cfg(feature = "embassy-sync")]
#vis struct #publish_variant_ident #publish_generics #publ_where_clause { #vis struct #publish_variant_ident #publish_generics #publ_where_clause {
pub poll: #ident #og_type_generics, pub poll: #ident #og_type_generics,
pub publisher: #publisher_path<#value_type_ident, #mutex_t_ident, #capacity_ident, #num_subs_ident>, pub publisher: #publisher_path<#value_type_ident, #mutex_t_ident, #capacity_ident, #num_subs_ident>,
} }
// ----- Publish impl ---------------------------------- // ----- Publish impl ----------------------------------
//#[cfg(feature = "embassy-sync")] #[cfg(feature = "embassy-sync")]
impl #publ_impl_generics #poll_path for #publish_variant_ident #publ_type_generics #publ_where_clause { impl #publ_impl_generics #poll_path for #publish_variant_ident #publ_type_generics #publ_where_clause {
type Value = #value_type_ident; type Value = #value_type_ident;
@ -195,7 +195,7 @@ pub fn poll_variant_macro(input: TokenStream) -> TokenStream {
} }
} }
//#[cfg(feature = "embassy-sync")] #[cfg(feature = "embassy-sync")]
impl #publ_impl_generics #publish_path<#capacity_ident, #num_subs_ident> for #publish_variant_ident #publ_type_generics #publ_where_clause { impl #publ_impl_generics #publish_path<#capacity_ident, #num_subs_ident> for #publish_variant_ident #publ_type_generics #publ_where_clause {
type Value = #value_type_ident; type Value = #value_type_ident;
type Mutex = #mutex_t_ident; type Mutex = #mutex_t_ident;
@ -209,14 +209,14 @@ pub fn poll_variant_macro(input: TokenStream) -> TokenStream {
} }
// ----- StatePub struct ---------------------------------- // ----- StatePub struct ----------------------------------
//#[cfg(feature = "embassy-sync")] #[cfg(feature = "embassy-sync")]
#vis struct #state_pub_variant_ident #publish_generics #publ_where_clause { #vis struct #state_pub_variant_ident #publish_generics #publ_where_clause {
pub poll: #ident #og_type_generics, pub poll: #ident #og_type_generics,
pub state: #state_path<#value_type_ident>, pub state: #state_path<#value_type_ident>,
pub publisher: #publisher_path<#value_type_ident, #mutex_t_ident, #capacity_ident, #num_subs_ident>, pub publisher: #publisher_path<#value_type_ident, #mutex_t_ident, #capacity_ident, #num_subs_ident>,
} }
//#[cfg(feature = "embassy-sync")] #[cfg(feature = "embassy-sync")]
impl #publ_impl_generics #poll_path for #state_pub_variant_ident #publ_type_generics #publ_where_clause { impl #publ_impl_generics #poll_path for #state_pub_variant_ident #publ_type_generics #publ_where_clause {
type Value = #value_type_ident; type Value = #value_type_ident;
@ -229,7 +229,7 @@ pub fn poll_variant_macro(input: TokenStream) -> TokenStream {
} }
} }
//#[cfg(feature = "embassy-sync")] #[cfg(feature = "embassy-sync")]
impl #publ_impl_generics #stateful_path for #state_pub_variant_ident #publ_type_generics #publ_where_clause { impl #publ_impl_generics #stateful_path for #state_pub_variant_ident #publ_type_generics #publ_where_clause {
type Value = #value_type_ident; type Value = #value_type_ident;
@ -244,7 +244,7 @@ pub fn poll_variant_macro(input: TokenStream) -> TokenStream {
} }
} }
//#[cfg(feature = "embassy-sync")] #[cfg(feature = "embassy-sync")]
impl #publ_impl_generics #publish_path<#capacity_ident, #num_subs_ident> for #state_pub_variant_ident #publ_type_generics #publ_where_clause { impl #publ_impl_generics #publish_path<#capacity_ident, #num_subs_ident> for #state_pub_variant_ident #publ_type_generics #publ_where_clause {
type Value = #value_type_ident; type Value = #value_type_ident;
type Mutex = #mutex_t_ident; type Mutex = #mutex_t_ident;