ExtSerializable -> SerializableExt

This commit is contained in:
AF 2023-06-30 19:33:11 +00:00
parent e49bb3d37a
commit ba87a07ce6

View File

@ -24,12 +24,12 @@ impl Display for Address {
} }
/// Extension trait for [Serializable]s. /// Extension trait for [Serializable]s.
pub trait ExtSerializable: Serializable { pub trait SerializableExt: Serializable {
/// Serialize into a [Vec] of bytes. /// Serialize into a [Vec] of bytes.
fn bytes(&self) -> Vec<u8>; fn bytes(&self) -> Vec<u8>;
} }
impl<S: Serializable> ExtSerializable for S { impl<S: Serializable> SerializableExt for S {
fn bytes(&self) -> Vec<u8> { fn bytes(&self) -> Vec<u8> {
let mut vec = Vec::new(); let mut vec = Vec::new();
self.serialize(&mut vec); self.serialize(&mut vec);