Create a new empty transaction log
(transaction_id: TransactionId)
| 66 | impl TransactionLog { |
| 67 | /// Create a new empty transaction log |
| 68 | pub fn new(transaction_id: TransactionId) -> Self { |
| 69 | Self { |
| 70 | transaction_id, |
| 71 | undo_operations: Vec::new(), |
| 72 | operation_count: 0, |
| 73 | estimated_size_bytes: std::mem::size_of::<Self>(), |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | /// Add an undo operation to the log |
| 78 | pub fn log_operation(&mut self, operation: UndoOperation) { |
nothing calls this directly
no outgoing calls
no test coverage detected