pub struct NoOpDatabaseHandler;Expand description
A no-op handler that logs operations but doesn’t persist anything. Useful for testing Raft replication without a real database.
Trait Implementations§
Source§impl DatabaseOperationHandler for NoOpDatabaseHandler
impl DatabaseOperationHandler for NoOpDatabaseHandler
Source§fn insert_document(
&self,
_collection: &str,
_document: &[u8],
) -> Result<String, String>
fn insert_document( &self, _collection: &str, _document: &[u8], ) -> Result<String, String>
Insert a document into a collection.
Source§fn update_document(
&self,
_collection: &str,
_doc_id: &str,
_document: &[u8],
) -> Result<(), String>
fn update_document( &self, _collection: &str, _doc_id: &str, _document: &[u8], ) -> Result<(), String>
Update a document in a collection.
Source§fn delete_document(
&self,
_collection: &str,
_doc_id: &str,
) -> Result<(), String>
fn delete_document( &self, _collection: &str, _doc_id: &str, ) -> Result<(), String>
Delete a document from a collection.
Source§fn create_node(
&self,
_label: &str,
_properties: &[u8],
) -> Result<String, String>
fn create_node( &self, _label: &str, _properties: &[u8], ) -> Result<String, String>
Create a graph node.
Source§fn create_edge(
&self,
_edge_type: &str,
_from_node: &str,
_to_node: &str,
_properties: &[u8],
) -> Result<String, String>
fn create_edge( &self, _edge_type: &str, _from_node: &str, _to_node: &str, _properties: &[u8], ) -> Result<String, String>
Create a graph edge.
Source§impl Default for NoOpDatabaseHandler
impl Default for NoOpDatabaseHandler
Source§fn default() -> NoOpDatabaseHandler
fn default() -> NoOpDatabaseHandler
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for NoOpDatabaseHandler
impl RefUnwindSafe for NoOpDatabaseHandler
impl Send for NoOpDatabaseHandler
impl Sync for NoOpDatabaseHandler
impl Unpin for NoOpDatabaseHandler
impl UnsafeUnpin for NoOpDatabaseHandler
impl UnwindSafe for NoOpDatabaseHandler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more