Skip to content
Snippets Groups Projects

Write `get-file` and commands to get the list of blocks from another node

1 file
+ 3
2
Compare changes
  • Side-by-side
  • Inline
+ 3
2
@@ -13,9 +13,10 @@ pub(crate) trait ConvertSer {
@@ -13,9 +13,10 @@ pub(crate) trait ConvertSer {
fn convert_ser(&self) -> impl Serialize;
fn convert_ser(&self) -> impl Serialize;
}
}
/// Used to implement for all types that are already Serialize and only need to return self (kind of a default implementatioon basically)
/// Used to implement for all types that are already Serialize and only need to return self (kind of a default implementatioon basically).
/// We do not directly implement for all Serialize, because it is a foreign trait and could lead to double implementation conflicts later on if PeerID decided to implement Serialize for example
/// We do not directly implement for all Serialize, because it is a foreign trait and could lead to double implementation conflicts later on if PeerID decided to implement Serialize for example
/// Macro rule taken from: https://stackoverflow.com/a/50223259
///
 
/// Macro rule taken from: <https://stackoverflow.com/a/50223259>
macro_rules! impl_Convert {
macro_rules! impl_Convert {
(for $($t:ty),+) => {
(for $($t:ty),+) => {
$(impl ConvertSer for $t {
$(impl ConvertSer for $t {
Loading