pub struct StorageCostModel { /* private fields */ }Implementations§
Source§impl StorageCostModel
impl StorageCostModel
pub fn new(cost_model: StorageCostModelXdr) -> StorageCostModel
pub fn no_cost_model() -> StorageCostModel
pub fn serialize(&self) -> Result<Vec<u8>, WriteError>
Sourcepub fn bytestring_cost(&self, length: usize) -> i128
pub fn bytestring_cost(&self, length: usize) -> i128
Cost of a bytestring of the given length
Sourcepub fn nnint_cost(&self) -> i128
pub fn nnint_cost(&self) -> i128
Cost of a non-negative integer
Sourcepub fn contract_deployment_cost(&self, length: usize) -> i128
pub fn contract_deployment_cost(&self, length: usize) -> i128
Cost of a contract deployment of the given length
Sourcepub fn balance_cost(&self) -> i128
pub fn balance_cost(&self) -> i128
Cost of a native token balance
pub fn as_xdr(&self) -> StorageCostModelXdr
Auto Trait Implementations§
impl Freeze for StorageCostModel
impl RefUnwindSafe for StorageCostModel
impl Send for StorageCostModel
impl Sync for StorageCostModel
impl Unpin for StorageCostModel
impl UnsafeUnpin for StorageCostModel
impl UnwindSafe for StorageCostModel
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