/// Private API to create new transaction, users should always use [`PreservedCatalog::open_transaction`].
Private API to create new transaction, users should always use [`PreservedCatalog::open_transaction`].
Private API to create new transaction users should always use [ ` PreservedCatalog :: open_transaction ` ] .
fn new(catalog_inner: &PreservedCatalogInner<S>, uuid: Uuid) -> Self {
        let (revision_counter, previous_uuid) = match &catalog_inner.previous_tkey {
            Some(tkey) => (tkey.revision_counter + 1, tkey.uuid.to_string()),
            None => (0, String::new()),
        };
        Self {
            next_state: S::clone_or_keep(&catalog_inner.state),
            proto: proto::Transaction {
                actions: vec![],
                version: TRANSACTION_VERSION,
                uuid: uuid.to_string(),
                revision_counter,
                previous_uuid,
                start_timestamp: Some(Utc::now().into()),
            },
        }
    }
fn new ( catalog_inner : & PreservedCatalogInner < S > , uuid : Uuid ) -> Self { let ( revision_counter , previous_uuid ) = match & catalog_inner . previous_tkey { Some ( tkey ) => ( tkey . revision_counter + 1 , tkey . uuid . to_string ( ) ) , None => ( 0 , String :: new ( ) ) , } ; Self { next_state : S :: clone_or_keep ( & catalog_inner . state ) , proto : proto :: Transaction { actions : vec ! [ ] , version : TRANSACTION_VERSION , uuid : uuid . to_string ( ) , revision_counter , previous_uuid , start_timestamp : Some ( Utc :: now ( ) . into ( ) ) , } , } }
Private API to create new transaction, users should always use [`PreservedCatalog::open_transaction`].
Private API to create new transaction users should always use [ ` PreservedCatalog :: open_transaction ` ] .
catalog_inner
&PreservedCatalogInner<S>
uuid
Uuid