Skip to content
Snippets Groups Projects
Commit c808340d authored by yjh's avatar yjh Committed by GitHub
Browse files

sp-core: impl serde for some offchain types (#11512)


* sp-core: impl serde for some offchain types

* Update primitives/core/src/offchain/mod.rs

Co-authored-by: default avatarBastian Köcher <bkchr@users.noreply.github.com>

* remove serde impls from OpaqueNetworkState/OpaqueMultiaddr

* derive default

Co-authored-by: default avatarBastian Köcher <bkchr@users.noreply.github.com>
parent 96809dca
No related merge requests found
......@@ -208,12 +208,14 @@ impl OpaqueMultiaddr {
#[derive(
Clone, Copy, PartialEq, Eq, Ord, PartialOrd, Default, RuntimeDebug, PassByInner, Encode, Decode,
)]
#[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))]
pub struct Timestamp(u64);
/// Duration type
#[derive(
Clone, Copy, PartialEq, Eq, Ord, PartialOrd, Default, RuntimeDebug, PassByInner, Encode, Decode,
)]
#[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))]
pub struct Duration(u64);
impl Duration {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment