Struct soroban_simulation_zephyr::NetworkConfig
source · pub struct NetworkConfig {
pub fee_configuration: FeeConfiguration,
pub rent_fee_configuration: RentFeeConfiguration,
pub tx_max_instructions: i64,
pub tx_memory_limit: u32,
pub cpu_cost_params: ContractCostParams,
pub memory_cost_params: ContractCostParams,
pub min_temp_entry_ttl: u32,
pub min_persistent_entry_ttl: u32,
pub max_entry_ttl: u32,
}
Expand description
Network configuration necessary for Soroban operation simulations.
This should normally be loaded from the ledger.
Fields§
§fee_configuration: FeeConfiguration
§rent_fee_configuration: RentFeeConfiguration
§tx_max_instructions: i64
§tx_memory_limit: u32
§cpu_cost_params: ContractCostParams
§memory_cost_params: ContractCostParams
§min_temp_entry_ttl: u32
§min_persistent_entry_ttl: u32
§max_entry_ttl: u32
Implementations§
source§impl NetworkConfig
impl NetworkConfig
sourcepub fn load_from_snapshot(
snapshot: &impl SnapshotSourceWithArchive,
bucket_list_size: u64,
) -> Result<Self>
pub fn load_from_snapshot( snapshot: &impl SnapshotSourceWithArchive, bucket_list_size: u64, ) -> Result<Self>
Loads configuration from the ledger snapshot.
This may only fail in case when provided snapshot doesn’t contain all the necessary entries or when these entries are mis-configured.
sourcepub fn fill_config_fields_in_ledger_info(&self, ledger_info: &mut LedgerInfo)
pub fn fill_config_fields_in_ledger_info(&self, ledger_info: &mut LedgerInfo)
Fills the ledger_info
fields that are loaded from the config.
This should normally be used to populate TTL-related fields in
LedgerInfo
, so that config loading logic can be encapsulated
just in NetworkConfig
.
Trait Implementations§
source§impl Clone for NetworkConfig
impl Clone for NetworkConfig
source§fn clone(&self) -> NetworkConfig
fn clone(&self) -> NetworkConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for NetworkConfig
impl Debug for NetworkConfig
source§impl Default for NetworkConfig
impl Default for NetworkConfig
source§fn default() -> NetworkConfig
fn default() -> NetworkConfig
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for NetworkConfig
impl<'de> Deserialize<'de> for NetworkConfig
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for NetworkConfig
impl PartialEq for NetworkConfig
source§impl Serialize for NetworkConfig
impl Serialize for NetworkConfig
impl Eq for NetworkConfig
impl StructuralPartialEq for NetworkConfig
Auto Trait Implementations§
impl Freeze for NetworkConfig
impl RefUnwindSafe for NetworkConfig
impl Send for NetworkConfig
impl Sync for NetworkConfig
impl Unpin for NetworkConfig
impl UnwindSafe for NetworkConfig
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T, U, V, W, E, C> Compare<(T, U, V, W)> for C
impl<T, U, V, W, E, C> Compare<(T, U, V, W)> for C
type Error = E
fn compare( &self, a: &(T, U, V, W), b: &(T, U, V, W), ) -> Result<Ordering, <C as Compare<(T, U, V, W)>>::Error>
source§impl<T, U, V, W, X, E, C> Compare<(T, U, V, W, X)> for C
impl<T, U, V, W, X, E, C> Compare<(T, U, V, W, X)> for C
type Error = E
fn compare( &self, a: &(T, U, V, W, X), b: &(T, U, V, W, X), ) -> Result<Ordering, <C as Compare<(T, U, V, W, X)>>::Error>
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.