ExtSerializable
-> SerializableExt
This commit is contained in:
parent
e49bb3d37a
commit
ba87a07ce6
@ -24,12 +24,12 @@ impl Display for Address {
|
||||
}
|
||||
|
||||
/// Extension trait for [Serializable]s.
|
||||
pub trait ExtSerializable: Serializable {
|
||||
pub trait SerializableExt: Serializable {
|
||||
/// Serialize into a [Vec] of bytes.
|
||||
fn bytes(&self) -> Vec<u8>;
|
||||
}
|
||||
|
||||
impl<S: Serializable> ExtSerializable for S {
|
||||
impl<S: Serializable> SerializableExt for S {
|
||||
fn bytes(&self) -> Vec<u8> {
|
||||
let mut vec = Vec::new();
|
||||
self.serialize(&mut vec);
|
||||
|
Loading…
Reference in New Issue
Block a user