#[allow(unused_imports, clippy::wildcard_imports)]
use super::*;
impl ConfigSettingContractLedgerCostV0 {
#[must_use]
pub const fn const_xdr_len(&self) -> usize {
let mut empty: [u8; 0] = [];
let mut w = ConstWriter::new(&mut empty);
w.write_type_config_setting_contract_ledger_cost_v0(self);
w.len()
}
#[must_use]
pub const fn const_to_xdr<const N: usize>(&self) -> [u8; N] {
let mut buf = [0u8; N];
let mut w = ConstWriter::new(&mut buf);
w.write_type_config_setting_contract_ledger_cost_v0(self);
assert!(
w.len() == N,
"const_to_xdr: N does not equal the XDR-encoded length"
);
buf
}
}
impl ConstWriter<'_> {
pub const fn write_type_config_setting_contract_ledger_cost_v0(
&mut self,
v: &ConfigSettingContractLedgerCostV0,
) {
self.write_u32(v.ledger_max_disk_read_entries);
self.write_u32(v.ledger_max_disk_read_bytes);
self.write_u32(v.ledger_max_write_ledger_entries);
self.write_u32(v.ledger_max_write_bytes);
self.write_u32(v.tx_max_disk_read_entries);
self.write_u32(v.tx_max_disk_read_bytes);
self.write_u32(v.tx_max_write_ledger_entries);
self.write_u32(v.tx_max_write_bytes);
self.write_i64(v.fee_disk_read_ledger_entry);
self.write_i64(v.fee_write_ledger_entry);
self.write_i64(v.fee_disk_read1_kb);
self.write_i64(v.soroban_state_target_size_bytes);
self.write_i64(v.rent_fee1_kb_soroban_state_size_low);
self.write_i64(v.rent_fee1_kb_soroban_state_size_high);
self.write_u32(v.soroban_state_rent_fee_growth_factor);
}
}