pub trait LogDatabase<'db>: Send + Sync {
type DatabaseType;
type Error;
type TransactionType;
// Required methods
fn new(db: Arc<Self::DatabaseType>) -> Result<Self, Self::Error>
where Self: Sized;
fn log_event(
&self,
txn: &Self::TransactionType,
signed_event: &SignedEventMessage,
) -> Result<(), Self::Error>;
fn log_event_with_new_transaction(
&self,
signed_event: &SignedEventMessage,
) -> Result<(), Self::Error>;
fn log_receipt(
&self,
txn: &Self::TransactionType,
signed_receipt: &SignedNontransferableReceipt,
) -> Result<(), Self::Error>;
fn log_receipt_with_new_transaction(
&self,
signed_receipt: &SignedNontransferableReceipt,
) -> Result<(), Self::Error>;
fn get_signed_event(
&self,
said: &SelfAddressingIdentifier,
) -> Result<Option<TimestampedSignedEventMessage>, Self::Error>;
fn get_event(
&self,
said: &SelfAddressingIdentifier,
) -> Result<Option<KeriEvent<KeyEvent>>, Self::Error>;
fn get_signatures(
&self,
said: &SelfAddressingIdentifier,
) -> Result<Option<impl Iterator<Item = IndexedSignature>>, Self::Error>;
fn get_nontrans_couplets(
&self,
said: &SelfAddressingIdentifier,
) -> Result<Option<impl Iterator<Item = Nontransferable>>, Self::Error>;
fn get_trans_receipts(
&self,
said: &SelfAddressingIdentifier,
) -> Result<impl DoubleEndedIterator<Item = Transferable>, Self::Error>;
fn remove_nontrans_receipt(
&self,
txn_mode: &Self::TransactionType,
said: &SelfAddressingIdentifier,
nontrans: impl IntoIterator<Item = Nontransferable>,
) -> Result<(), Self::Error>;
fn remove_nontrans_receipt_with_new_transaction(
&self,
said: &SelfAddressingIdentifier,
nontrans: impl IntoIterator<Item = Nontransferable>,
) -> Result<(), Self::Error>;
}Required Associated Types§
Required Methods§
fn new(db: Arc<Self::DatabaseType>) -> Result<Self, Self::Error>where
Self: Sized,
fn log_event( &self, txn: &Self::TransactionType, signed_event: &SignedEventMessage, ) -> Result<(), Self::Error>
fn log_event_with_new_transaction( &self, signed_event: &SignedEventMessage, ) -> Result<(), Self::Error>
fn log_receipt( &self, txn: &Self::TransactionType, signed_receipt: &SignedNontransferableReceipt, ) -> Result<(), Self::Error>
fn log_receipt_with_new_transaction( &self, signed_receipt: &SignedNontransferableReceipt, ) -> Result<(), Self::Error>
fn get_signed_event( &self, said: &SelfAddressingIdentifier, ) -> Result<Option<TimestampedSignedEventMessage>, Self::Error>
fn get_event( &self, said: &SelfAddressingIdentifier, ) -> Result<Option<KeriEvent<KeyEvent>>, Self::Error>
fn get_signatures( &self, said: &SelfAddressingIdentifier, ) -> Result<Option<impl Iterator<Item = IndexedSignature>>, Self::Error>
fn get_nontrans_couplets( &self, said: &SelfAddressingIdentifier, ) -> Result<Option<impl Iterator<Item = Nontransferable>>, Self::Error>
fn get_trans_receipts( &self, said: &SelfAddressingIdentifier, ) -> Result<impl DoubleEndedIterator<Item = Transferable>, Self::Error>
fn remove_nontrans_receipt( &self, txn_mode: &Self::TransactionType, said: &SelfAddressingIdentifier, nontrans: impl IntoIterator<Item = Nontransferable>, ) -> Result<(), Self::Error>
fn remove_nontrans_receipt_with_new_transaction( &self, said: &SelfAddressingIdentifier, nontrans: impl IntoIterator<Item = Nontransferable>, ) -> Result<(), Self::Error>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.