pub trait Ledger {
// Required methods
fn set(&self, l: LedgerInfo);
fn set_protocol_version(&self, protocol_version: u32);
fn set_sequence_number(&self, sequence_number: u32);
fn set_timestamp(&self, timestamp: u64);
fn set_network_id(&self, network_id: [u8; 32]);
fn set_base_reserve(&self, base_reserve: u32);
fn set_min_temp_entry_ttl(&self, min_temp_entry_ttl: u32);
fn set_min_persistent_entry_ttl(&self, min_persistent_entry_ttl: u32);
fn set_max_entry_ttl(&self, max_entry_ttl: u32);
fn get(&self) -> LedgerInfo;
fn with_mut<F>(&self, f: F)
where F: FnMut(&mut LedgerInfo);
}
Available on crate feature
testutils
only.Expand description
Test utilities for Ledger
.
Required Methods§
Sourcefn set(&self, l: LedgerInfo)
fn set(&self, l: LedgerInfo)
Set ledger info.
Sourcefn set_protocol_version(&self, protocol_version: u32)
fn set_protocol_version(&self, protocol_version: u32)
Sets the protocol version.
Sourcefn set_sequence_number(&self, sequence_number: u32)
fn set_sequence_number(&self, sequence_number: u32)
Sets the sequence number.
Sourcefn set_timestamp(&self, timestamp: u64)
fn set_timestamp(&self, timestamp: u64)
Sets the timestamp.
Sourcefn set_network_id(&self, network_id: [u8; 32])
fn set_network_id(&self, network_id: [u8; 32])
Sets the network ID.
Sourcefn set_base_reserve(&self, base_reserve: u32)
fn set_base_reserve(&self, base_reserve: u32)
Sets the base reserve.
Sourcefn set_min_temp_entry_ttl(&self, min_temp_entry_ttl: u32)
fn set_min_temp_entry_ttl(&self, min_temp_entry_ttl: u32)
Sets the minimum temporary entry time-to-live.
Sourcefn set_min_persistent_entry_ttl(&self, min_persistent_entry_ttl: u32)
fn set_min_persistent_entry_ttl(&self, min_persistent_entry_ttl: u32)
Sets the minimum persistent entry time-to-live.
Sourcefn set_max_entry_ttl(&self, max_entry_ttl: u32)
fn set_max_entry_ttl(&self, max_entry_ttl: u32)
Sets the maximum entry time-to-live.
Sourcefn get(&self) -> LedgerInfo
fn get(&self) -> LedgerInfo
Get ledger info.
Sourcefn with_mut<F>(&self, f: F)where
F: FnMut(&mut LedgerInfo),
fn with_mut<F>(&self, f: F)where
F: FnMut(&mut LedgerInfo),
Modify the ledger info.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.