Fill in various DB functions

This commit is contained in:
Luke Parker
2024-08-28 23:31:31 -04:00
parent 738636c238
commit 04a971a024
7 changed files with 77 additions and 19 deletions

View File

@@ -8,7 +8,12 @@ use serai_primitives::{ExternalAddress, Balance};
use crate::Id;
/// An address on the external network.
pub trait Address: Send + Sync + TryFrom<ExternalAddress> {}
pub trait Address: Send + Sync + TryFrom<ExternalAddress> {
/// Write this address.
fn write(&self, writer: &mut impl io::Write) -> io::Result<()>;
/// Read an address.
fn read(reader: &mut impl io::Read) -> io::Result<Self>;
}
/// The type of the output.
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]