-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
86 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
use core::fmt::Debug; | ||
|
||
pub use super::header::{serde_bincode_compat as header, serde_bincode_compat::*}; | ||
use serde::{de::DeserializeOwned, Serialize}; | ||
|
||
/// Trait for types that can be serialized and deserialized using bincode. | ||
pub trait SerdeBincodeCompat: Sized + 'static { | ||
/// Serde representation of the type for bincode serialization. | ||
type BincodeRepr<'a>: Debug + Serialize + DeserializeOwned + From<&'a Self> + Into<Self>; | ||
} | ||
|
||
impl SerdeBincodeCompat for alloy_consensus::Header { | ||
type BincodeRepr<'a> = alloy_consensus::serde_bincode_compat::Header<'a>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters