26 lines
778 B
Rust
26 lines
778 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
use super::role::TransactionMode;
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Default, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
|
|
pub struct ConditionCap {
|
|
pub role_deposit: String,
|
|
pub role_transaction: TransactionMode,
|
|
}
|
|
|
|
impl ConditionCap {
|
|
pub fn new(role_deposit: String, role_transaction: TransactionMode) -> Self {
|
|
ConditionCap {
|
|
role_deposit,
|
|
role_transaction,
|
|
}
|
|
}
|
|
// Affiche les informations de la structure
|
|
pub fn display_info(&self) {
|
|
println!("ConditionCap:");
|
|
println!("Role Deposit: {}", self.role_deposit);
|
|
println!("Role Transaction:");
|
|
self.role_transaction.display_info(); // Appelle display_info sur role_transaction
|
|
}
|
|
}
|