-
Notifications
You must be signed in to change notification settings - Fork 1
UInt128
A 128-bit unsigned integer value type. Storage is based upon a tuple of 2, 64-bit, unsigned integers.
public struct UInt128 BinaryInteger, Codable, Comparable, CustomDebugStringConvertible, CustomStringConvertible, Equatable, ExpressibleByIntegerLiteral, FixedWidthInteger, Hashable, Numeric
Designated initializer for the UInt128 type.
public init(upperBits: UInt64, lowerBits: UInt64) public init() Initialize a UInt128 value from a string.
Returns nil if input cannot be converted to a UInt128 value.
public init?(_ source: String) - source: the string that will be converted into a UInt128 value. Defaults to being analyzed as a base10 number, but can be prefixed with
0bfor base2,0ofor base8 or0xfor base16.
Creates a UInt128 from a given value, with the input's value truncated to a size no larger than what UInt128 can handle. Since the input is constrained to an UInt, no truncation needs to occur, as a UInt is currently 64 bits at the maximum.
public init(_truncatingBits bits: UInt) Creates an integer from its big-endian representation, changing the byte order if necessary.
public init(bigEndian value: UInt128) Creates an integer from its little-endian representation, changing the byte order if necessary.
public init(littleEndian value: UInt128) public init?<T : BinaryFloatingPoint>(exactly source: T) public init<T : BinaryFloatingPoint>(_ source: T) public init(integerLiteral value: IntegerLiteralType) public init(from decoder: Decoder) throws The required initializer of ExpressibleByStringLiteral.
@available(swift, deprecated: 5.0, message: "The ExpressibleByStringLiteral conformance has been removed. Use failable initializer instead.", renamed: "init(_:)")
public init(stringLiteral value: StringLiteralType) Note that the ExpressibleByStringLiteral conformance has been removed because it
does not handle failures gracefully and it always shadows the failable initializer in Swift 5.
Counts up the significant bits in stored data.
public var significantBits: UInt128 public var nonzeroBitCount: Int public var leadingZeroBitCount: Int Returns the big-endian representation of the integer, changing the byte order if necessary.
public var bigEndian: UInt128 Returns the little-endian representation of the integer, changing the byte order if necessary.
public var littleEndian: UInt128 Returns the current integer with the byte order swapped.
public var byteSwapped: UInt128 public static var bitWidth : Int public var words: [UInt] public var trailingZeroBitCount: Int public var description: String public var debugDescription: String public func addingReportingOverflow(_ rhs: UInt128) -> (partialValue: UInt128, overflow: Bool) public func subtractingReportingOverflow(_ rhs: UInt128) -> (partialValue: UInt128, overflow: Bool) public func multipliedReportingOverflow(by rhs: UInt128) -> (partialValue: UInt128, overflow: Bool) public func multipliedFullWidth(by other: UInt128) -> (high: UInt128, low: UInt128.Magnitude) public func dividedReportingOverflow(by rhs: UInt128) -> (partialValue: UInt128, overflow: Bool) public func dividingFullWidth(_ dividend: (high: UInt128, low: UInt128)) -> (quotient: UInt128, remainder: UInt128) public func remainderReportingOverflow(dividingBy rhs: UInt128) -> (partialValue: UInt128, overflow: Bool) public func quotientAndRemainder(dividingBy rhs: UInt128) -> (quotient: UInt128, remainder: UInt128) public func hash(into hasher: inout Hasher) public func encode(to encoder: Encoder) throws Initialize a UInt128 value from a string.
@available(swift, deprecated: 3.2, renamed: "init(_:)")
public static func fromUnparsedString(_ source: String) throws -> UInt128 - source: the string that will be converted into a UInt128 value. Defaults to being analyzed as a base10 number, but can be prefixed with
0bfor base2,0ofor base8 or0xfor base16.
public static func /(lhs: UInt128, rhs: UInt128) -> UInt128 public static func /=(lhs: inout UInt128, rhs: UInt128) public static func %(lhs: UInt128, rhs: UInt128) -> UInt128 public static func %=(lhs: inout UInt128, rhs: UInt128) Performs a bitwise AND operation on 2 UInt128 data types.
public static func &=(lhs: inout UInt128, rhs: UInt128) Performs a bitwise OR operation on 2 UInt128 data types.
public static func |=(lhs: inout UInt128, rhs: UInt128) Performs a bitwise XOR operation on 2 UInt128 data types.
public static func ^=(lhs: inout UInt128, rhs: UInt128) Perform a masked right SHIFT operation self.
public static func &>>=(lhs: inout UInt128, rhs: UInt128) The masking operation will mask rhs against the highest
shift value that will not cause an overflowing shift before
performing the shift. IE: rhs = 128 will become rhs = 0
and rhs = 129 will become rhs = 1.
Perform a masked left SHIFT operation on self.
public static func &<<=(lhs: inout UInt128, rhs: UInt128) The masking operation will mask rhs against the highest
shift value that will not cause an overflowing shift before
performing the shift. IE: rhs = 128 will become rhs = 0
and rhs = 129 will become rhs = 1.
public static func +(lhs: UInt128, rhs: UInt128) -> UInt128 public static func +=(lhs: inout UInt128, rhs: UInt128) public static func -(lhs: UInt128, rhs: UInt128) -> UInt128 public static func -=(lhs: inout UInt128, rhs: UInt128) public static func *(lhs: UInt128, rhs: UInt128) -> UInt128 public static func *=(lhs: inout UInt128, rhs: UInt128) Checks if the lhs is equal to the rhs.
public static func ==(lhs: UInt128, rhs: UInt128) -> Bool public static func <(lhs: UInt128, rhs: UInt128) -> Bool Generated at 2023-07-20T02:24:43+0000 using swift-doc 1.0.0-rc.1.
Types
- Account
- AccountAddress
- AccountAddressTag
- AccountResponse
- AnyTransactionArgument
- AptosError
- AptosRestClientError
- BoolTag
- ClientConfig
- Collection
- Ed25519Authenticator
- Ed25519BIP32
- EntryFunction
- HTTPMethod
- InfoResponse
- InvalidPropertyType
- Mnemonic
- Mnemonic.Error
- ModuleBundle
- ModuleId
- MultiAgentAuthenticator
- MultiAgentRawTransaction
- MultiEd25519Authenticator
- MultiPublicKey
- MultiSignature
- Object
- PrivateKey
- Property
- PropertyMap
- PublicKey
- RawTransaction
- RotatingProofChallenge
- Royalty
- Script
- ScriptArgument
- SeedMode
- Serializer
- Signature
- SignedTransaction
- StructTag
- StructTagValue
- Token
- TransactionArgument
- U128Tag
- U16Tag
- U256Tag
- U32Tag
- U64Tag
- U8Tag
- UInt128
- UInt128Errors
- Wallet
- Wordlists
Protocols
Global Variables
Global Functions
- _struct(_:)
- account(_:ledgerVersion:)
- accountBalance(_:_:)
- accountResource(_:_:_:)
- accountResources(_:_:)
- accountSequenceNumber(_:_:)
- addTokenProperty(_:_:_:)
- aggregatorValue(_:_:_:)
- asyncData(with:method:headers:body:)
- bcsTransfer(_:_:_:)
- bool()
- burnToken(_:_:)
- claimToken(_:_:_:_:_:_:)
- createBcsSignedTransaction(_:_:)
- createBcsSignedTransaction(_:_:_:)
- createBcsTransaction(_:_:)
- createBcsTransaction(_:_:_:)
- createCollection(_:_:_:_:)
- createCollection(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:)
- createCollectionPayload(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:)
- createMultiAgentBcsTransaction(_:_:_:)
- createToken(_:_:_:_:_:_:_:)
- decodeData(_:with:keyDecodingStrategy:dataDecodingStrategy:dateDecodingStrategy:)
- decodeUrl(_:with:)
- decodeUrl(with:_:)
- decodeUrl(with:_:_:)
- deserialize(from:)
- directTransferToken(_:_:_:_:_:_:_:)
- fixedBytes(length:)
- freezeToken(_:_:)
- fundAccount(_:_:)
- getCollection(_:_:)
- getTableItem(_:_:_:_:_:_:)
- getToken(_:_:_:_:_:)
- getTokenBalance(_:_:_:_:_:)
- getTokenData(_:_:_:_:)
- info()
- map(keyDecoder:valueDecoder:)
- mintSoulBoundToken(_:_:_:_:_:_:_:)
- mintToken(_:_:_:_:_:_:)
- mintTokenPayload(_:_:_:_:_:)
- offerToken(_:_:_:_:_:_:_:)
- publishPackage(_:_:_:)
- readObject(address:)
- remaining()
- removeTokenProperty(_:_:_:)
- sequence(valueDecoder:)
- serialize(_:)
- simulateTransaction(_:_:)
- string(_:)
- submitBcsTransaction(_:)
- submitTransaction(_:_:)
- toBytes(_:)
- transactionPending(_:)
- transfer(_:_:_:)
- u128(_:)
- u16(_:)
- u256(_:)
- u32(_:)
- u64(_:)
- u8(_:)
- uleb128()
- unfreezeToken(_:_:)
- updateTokenProperty(_:_:_:)
- verify(_:)
- waitForTransaction(_:)