24 lines
746 B
Rust
24 lines
746 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
use super::role::TransactionMode;
|
|
#[derive(Debug, Serialize, Deserialize, Default, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
|
|
pub struct Conditioncommit {
|
|
pub role_artefact: String,
|
|
pub role_transaction: TransactionMode,
|
|
}
|
|
|
|
impl Conditioncommit {
|
|
pub fn new(role_artefact: String, role_transaction: TransactionMode) -> Self {
|
|
Conditioncommit {
|
|
role_artefact,
|
|
role_transaction,
|
|
}
|
|
}
|
|
pub fn display_info(&self) {
|
|
println!("Conditioncommit:");
|
|
println!("Role Artefact: {}", self.role_artefact);
|
|
println!("Role Transaction:");
|
|
self.role_transaction.display_info(); // Appelle display_info sur role_transaction
|
|
}
|
|
}
|