Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Commit

Permalink
Document why macros have been used.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sajjon committed Feb 1, 2024
1 parent 1ff32e8 commit 5ba98a0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
use crate::prelude::*;

// We have to use macros since UniFFI does not support generics, that is the only
// reason this macro exists, if/when UniFFI supports generics, this macro should
// be replaced by `CollectionOfIdentifiedPersonaDataEntries<T>`.
macro_rules! declare_collection_of_identified_entry {
($id_ent_type:ty,$struct_name:ident) => {
/// A collection of identifiable PersonaData Entries.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ pub trait PersonaDataEntryValue: From<Self::Value> {
type Value;
}

// We have to use macros since UniFFI does not support generics, that is the only
// reason this macro exists, if/when UniFFI supports generics, this macro should
// be replaced by `PersonaDataIdentifiedEntry<T>`.
macro_rules! declare_identified_entry {
($value_type:ty,$struct_name:ident) => {
#[derive(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
use crate::prelude::*;

// We have to use macros since UniFFI does not support generics, that is the only
// reason this macro exists, if/when UniFFI supports generics, this macro should
// be replaced by `SharedToDappWithPersonaIDs<T>`.
macro_rules! declare_shared_with_dapp {
($id:ty,$struct_name:ident) => {
/// IDs that have been shared with an Dapp the user has interacted with
Expand Down

0 comments on commit 5ba98a0

Please sign in to comment.