ckb_types/conversion/
blockchain.rs

1use crate::{core, packed, prelude::*};
2
3impl Pack<packed::Uint64> for core::EpochNumberWithFraction {
4    fn pack(&self) -> packed::Uint64 {
5        self.full_value().pack()
6    }
7}
8
9impl<'r> Unpack<core::EpochNumberWithFraction> for packed::Uint64Reader<'r> {
10    fn unpack(&self) -> core::EpochNumberWithFraction {
11        core::EpochNumberWithFraction::from_full_value_unchecked(self.unpack())
12    }
13}
14impl_conversion_for_entity_unpack!(core::EpochNumberWithFraction, Uint64);