Version
type Version
BCS
The BCS serialized form of this type is specified in [`bcs-schema.abnf`](https://github.com/iotaledger/iota-rust-sdk/blob/develop/crates/iota-sdk-types/bcs-schema.abnf\).
type Version struct {
// contains filtered or unexported fields
}
func LiftFromExternalVersion
func LiftFromExternalVersion(handle uint64) *Version
func VersionCanceledRead
func VersionCanceledRead() *Version
Special version that is assigned to objects which are accessed immutably in a canceled transaction.
func VersionCongestedPriorToGasPriceFeedback
func VersionCongestedPriorToGasPriceFeedback() *Version
Special version that was assigned to congested objects which cause transaction cancellations. Note that this special version was only used prior to the introduction of a gas price feedback mechanism, but it is kept for backward compatibility.
func VersionFromU64
func VersionFromU64(value uint64) *Version
Create a new Version from a u64 value
func VersionLamportIncrement
func VersionLamportIncrement(inputs []*Version) (*Version, error)
Returns a new version that is greater than all versions in `inputs`, assuming this operation will not overflow.
func VersionMaxValidExcl
func VersionMaxValidExcl() *Version
An exclusive upper limit on a valid version: versions strictly smaller than this limit are valid versions.
A valid version means an object, which this version is assigned to, does not appear in a canceled transaction. Versions larger than this value are "special" and assigned to objects that appear in canceled transactions.
func VersionMinValidIncl
func VersionMinValidIncl() *Version
An inclusive lower limit on a valid version.
A valid version means an object, which this version is assigned to, does not appear in a canceled transaction.
func VersionNewCongestedWithSuggestedGasPrice
func VersionNewCongestedWithSuggestedGasPrice(suggestedGasPrice uint64) (*Version, error)
Returns a special version used for congested shared objects: `Version::MIN_CONGESTED + suggested_gas_price`, where `suggested_gas_price` is embedded into a congested version to facilitate a gas price feedback mechanism for transactions canceled due to shared object congestion.
func VersionRandomnessUnavailable
func VersionRandomnessUnavailable() *Version
func (*Version) AsU64
func (_self *Version) AsU64() uint64
Get the underlying u64 value of this version
func (*Version) Destroy
func (object *Version) Destroy()
func (*Version) GetCongestedVersionSuggestedGasPrice
func (_self *Version) GetCongestedVersionSuggestedGasPrice() (uint64, error)
Returns the `suggested_gas_price` embedded in this congested shared object version. The `suggested_gas_price` here is used for a gas price feedback mechanism for transactions canceled due to shared object congestion.
func (*Version) IsCanceled
func (_self *Version) IsCanceled() bool
Checks if this version is canceled, i.e., the corresponding object appears in a canceled transaction.
func (*Version) IsCongested
func (_self *Version) IsCongested() bool
Check if this version is congested, i.e., the corresponding object is the reason for transaction cancellation.
func (*Version) IsValid
func (_self *Version) IsValid() bool
Checks if this version is valid, i.e., the corresponding object does not appear in a canceled transaction.
func (*Version) Next
func (_self *Version) Next() (*Version, error)
Returns the next version, or an error if overflow occurs.
func (*Version) Previous
func (_self *Version) Previous() (*Version, error)
Returns the previous version, or an error if underflow occurs.
func (*Version) String
func (_self *Version) String() string
func (*Version) ToDisplayString
func (_self *Version) ToDisplayString() string
Render this type as human-readable text.
Some types also print this through the binding's native string conversion; this method is the spelling every object type has.
The layout is meant for reading and can change between releases. Use the JSON or BCS conversions for output that gets parsed.