UInt64
A 64-bit unsigned integer value type.
@frozen struct UInt64
Citizens in Swift
Conformances
protocol AdditiveArithmetic
A type with values that support addition and subtraction.
protocol BinaryInteger
An integer type with a binary representation.
protocol CVarArg
A type whose instances can be encoded, and appropriately passed, as elements of a C
va_list
.protocol Comparable
A type that can be compared using the relational operators
<
,<=
,>=
, and>
.protocol CustomReflectable
A type that explicitly supplies its own mirror.
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Decodable
A type that can decode itself from an external representation.
protocol Encodable
A type that can encode itself to an external representation.
protocol Equatable
A type that can be compared for value equality.
protocol ExpressibleByIntegerLiteral
A type that can be initialized with an integer literal.
protocol FixedWidthInteger
An integer type that uses a fixed size for every instance.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol LosslessStringConvertible
A type that can be represented as a string in a lossless, unambiguous way.
protocol Numeric
A type with values that support multiplication.
protocol SIMDScalar
A type that can be used as an element in a SIMD vector.
protocol Sendable
A type whose values can safely be passed across concurrency domains by copying.
protocol Strideable
A type representing continuous, one-dimensional values that can be offset and measured.
protocol UnsignedInteger
An integer type that can represent only nonnegative values.
Members
init(Double
) Creates an integer from the given floating-point value, rounding toward zero.
init(Float
) Creates an integer from the given floating-point value, rounding toward zero.
init(Float16
) Creates an integer from the given floating-point value, rounding toward zero.
init(Float80
) Creates an integer from the given floating-point value, rounding toward zero.
init(Unicode
.Scalar) Construct with value
v.value
.init(bitPattern: Int64
) Creates a new instance with the same memory representation as the given value.
init?(exactly: Double
) Creates an integer from the given floating-point value, if it can be represented exactly.
init?(exactly: Float
) Creates an integer from the given floating-point value, if it can be represented exactly.
init?(exactly: Float16
) Creates an integer from the given floating-point value, if it can be represented exactly.
init?(exactly: Float80
) Creates an integer from the given floating-point value, if it can be represented exactly.
init(from: Decoder
) throws Creates a new instance by decoding from the given decoder.
static var bitWidth: Int
The number of bits used for the underlying binary representation of values of this type.
var byteSwapped: UInt64
A representation of this integer with the byte order swapped.
var customMirror: Mirror
A mirror that reflects the
UInt64
instance.var leadingZeroBitCount: Int
The number of leading zeros in this value’s binary representation.
var nonzeroBitCount: Int
The number of bits equal to 1 in this value’s binary representation.
var trailingZeroBitCount: Int
The number of trailing zeros in this value’s binary representation.
var words: UInt64.Words
A collection containing the words of this value’s binary representation, in order from the least significant to most significant.
static func % (UInt64, UInt64
) -> UInt64 Returns the remainder of dividing the first value by the second.
static func %= (inout UInt64, UInt64
) Divides the first value by the second and stores the remainder in the left-hand-side variable.
static func & (UInt64, UInt64
) -> UInt64 Returns the result of performing a bitwise AND operation on the two given values.
static func &<< (UInt64, UInt64
) -> UInt64 Returns the result of shifting a value’s binary representation the specified number of digits to the left, masking the shift amount to the type’s bit width.
static func &<<= (inout UInt64, UInt64
) Returns the result of shifting a value’s binary representation the specified number of digits to the left, masking the shift amount to the type’s bit width, and stores the result in the left-hand-side variable.
static func &= (inout UInt64, UInt64
) Stores the result of performing a bitwise AND operation on the two given values in the left-hand-side variable.
static func &>> (UInt64, UInt64
) -> UInt64 Returns the result of shifting a value’s binary representation the specified number of digits to the right, masking the shift amount to the type’s bit width.
static func &>>= (inout UInt64, UInt64
) Calculates the result of shifting a value’s binary representation the specified number of digits to the right, masking the shift amount to the type’s bit width, and stores the result in the left-hand-side variable.
static func * (UInt64, UInt64
) -> UInt64 Multiplies two values and produces their product.
static func *= (inout UInt64, UInt64
) Multiplies two values and stores the result in the left-hand-side variable.
static func + (UInt64, UInt64
) -> UInt64 Adds two values and produces their sum.
static func += (inout UInt64, UInt64
) Adds two values and stores the result in the left-hand-side variable.
static func - (UInt64, UInt64
) -> UInt64 Subtracts one value from another and produces their difference.
static func -= (inout UInt64, UInt64
) Subtracts the second value from the first and stores the difference in the left-hand-side variable.
static func / (UInt64, UInt64
) -> UInt64 Returns the quotient of dividing the first value by the second.
static func /= (inout UInt64, UInt64
) Divides the first value by the second and stores the quotient in the left-hand-side variable.
static func < (UInt64, UInt64
) -> Bool static func <= (UInt64, UInt64
) -> Bool static func == (UInt64, UInt64
) -> Bool static func > (UInt64, UInt64
) -> Bool static func >= (UInt64, UInt64
) -> Bool static func ^ (UInt64, UInt64
) -> UInt64 Returns the result of performing a bitwise XOR operation on the two given values.
static func ^= (inout UInt64, UInt64
) Stores the result of performing a bitwise XOR operation on the two given values in the left-hand-side variable.
static func | (UInt64, UInt64
) -> UInt64 Returns the result of performing a bitwise OR operation on the two given values.
static func |= (inout UInt64, UInt64
) Stores the result of performing a bitwise OR operation on the two given values in the left-hand-side variable.
func addingReportingOverflow(UInt64
) -> (partialValue: UInt64, overflow: Bool) Returns the sum of this value and the given value, along with a Boolean value indicating whether overflow occurred in the operation.
func dividedReportingOverflow(by: UInt64
) -> (partialValue: UInt64, overflow: Bool) Returns the quotient obtained by dividing this value by the given value, along with a Boolean value indicating whether overflow occurred in the operation.
func dividingFullWidth((high: UInt64, low: UInt64.Magnitude)
) -> (quotient: UInt64, remainder: UInt64) Returns a tuple containing the quotient and remainder of dividing the given value by this value.
func encode(to: Encoder
) throws Encodes this value into the given encoder.
func hash(into: inout Hasher
) Hashes the essential components of this value by feeding them into the given hasher.
func multipliedFullWidth(by: UInt64
) -> (high: UInt64, low: UInt64.Magnitude) Returns a tuple containing the high and low parts of the result of multiplying this value by the given value.
func multipliedReportingOverflow(by: UInt64
) -> (partialValue: UInt64, overflow: Bool) Returns the product of this value and the given value, along with a Boolean value indicating whether overflow occurred in the operation.
func remainderReportingOverflow(dividingBy: UInt64
) -> (partialValue: UInt64, overflow: Bool) Returns the remainder after dividing this value by the given value, along with a Boolean value indicating whether overflow occurred during division.
func signum(
) -> UInt64 Returns
-1
if this value is negative and1
if it’s positive; otherwise,0
.func subtractingReportingOverflow(UInt64
) -> (partialValue: UInt64, overflow: Bool) Returns the difference obtained by subtracting the given value from this value, along with a Boolean value indicating whether overflow occurred in the operation.
struct SIMD16Storage
Storage for a vector of 16 integers.
struct SIMD2Storage
Storage for a vector of two integers.
struct SIMD32Storage
Storage for a vector of 32 integers.
struct SIMD4Storage
Storage for a vector of four integers.
struct SIMD64Storage
Storage for a vector of 64 integers.
struct SIMD8Storage
Storage for a vector of eight integers.
struct Words
A type that represents the words of this integer.
typealias IntegerLiteralType
A type that represents an integer literal.
typealias Magnitude
A type that can represent the absolute value of any possible value of this type.
typealias SIMDMaskScalar
var customPlaygroundQuickLook: _PlaygroundQuickLook
A custom playground Quick Look for the
UInt64
instance.
Features
init(
) Creates a new value equal to zero.
init?<S>(S, radix: Int
) Creates a new integer value from the given string and radix.
static var max: Self
The maximum representable integer in this type.
static var min: Self
The minimum representable integer in this type.
static func random(in: ClosedRange<Self>
) -> Self Returns a random value within the specified range.
static func random(in: Range<Self>
) -> Self Returns a random value within the specified range.
static func random<T>(in: ClosedRange<Self>, using: inout T
) -> Self Returns a random value within the specified range, using the given generator as a source for randomness.
static func random<T>(in: Range<Self>, using: inout T
) -> Self Returns a random value within the specified range, using the given generator as a source for randomness.
var magnitude: Self
The magnitude of this value.
static func != (Self, Self
) -> Bool static func != <Other>(Self, Other
) -> Bool Returns a Boolean value indicating whether the two given values are not equal.
static func != (Self, Self
) -> Bool static func &* (Self, Self
) -> Self Returns the product of the two given values, wrapping the result in case of any overflow.
static func &*= (inout Self, Self
) Multiplies two values and stores the result in the left-hand-side variable, wrapping any overflow.
static func &+ (Self, Self
) -> Self Returns the sum of the two given values, wrapping the result in case of any overflow.
static func &+= (inout Self, Self
) Adds two values and stores the result in the left-hand-side variable, wrapping any overflow.
static func &- (Self, Self
) -> Self Returns the difference of the two given values, wrapping the result in case of any overflow.
static func &-= (inout Self, Self
) Subtracts the second value from the first and stores the difference in the left-hand-side variable, wrapping any overflow.
static func + (Self
) -> Self Returns the given number unchanged.
static func ... (Self
) -> PartialRangeFrom<Self> Returns a partial range extending upward from a lower bound.
static func ... (Self
) -> PartialRangeThrough<Self> Returns a partial range up to, and including, its upper bound.
static func ... (Self, Self
) -> ClosedRange<Self> Returns a closed range that contains both of its bounds.
static func ..< (Self
) -> PartialRangeUpTo<Self> Returns a partial range up to, but not including, its upper bound.
static func ..< (Self, Self
) -> Range<Self> Returns a half-open range that contains its lower bound but not its upper bound.
static func < <Other>(Self, Other
) -> Bool Returns a Boolean value indicating whether the value of the first argument is less than that of the second argument.
static func <= <Other>(Self, Other
) -> Bool Returns a Boolean value indicating whether the value of the first argument is less than or equal to that of the second argument.
static func <= (Self, Self
) -> Bool static func == (Self, Self
) -> Bool static func == <Other>(Self, Other
) -> Bool Returns a Boolean value indicating whether the two given values are equal.
static func > <Other>(Self, Other
) -> Bool Returns a Boolean value indicating whether the value of the first argument is greater than that of the second argument.
static func > (Self, Self
) -> Bool static func >= <Other>(Self, Other
) -> Bool Returns a Boolean value indicating whether the value of the first argument is greater than or equal to that of the second argument.
static func >= (Self, Self
) -> Bool
Available in Foundation
Members
Extension in MultipartKit
Conformances
Extension in ArgumentParser
Conformances
protocol ExpressibleByArgument
A type that can be expressed as a command-line argument.
Extension in SwiftASN1
Conformances
protocol ASN1IntegerRepresentable
A protocol that represents any internal object that can present itself as an INTEGER, or be parsed from an INTEGER.
protocol DERImplicitlyTaggable
An ASN.1 node that can tolerate having an implicit tag.
protocol DERParseable
Defines a type that can be parsed from a DER-encoded form.
protocol DERSerializable
Defines a type that can be serialized in DER-encoded form.
Features
init(asn1Any: ASN1Any
) throws Construct this node from an ASN.1 ANY object.
init(asn1Any: ASN1Any, withIdentifier: ASN1Identifier
) throws Construct this node from an ASN.1 ANY object.
Extension in Atomics
Conformances
protocol AtomicInteger
A type that supports atomic integer operations through a separate atomic storage representation.
protocol AtomicValue
A type that supports atomic operations through a separate atomic storage representation.
Members
Extension in JSONDecoding
Conformances
protocol JSONDecodable
A type that can be decoded from a JSON variant value.
Extension in JSONEncoding
Conformances
protocol JSONEncodable
A type that can be encoded to a JSON variant value.
Extension in BSONDecoding
Conformances
protocol BSONDecodable
A type that can be decoded from a BSON variant value backed by some type of storage not particular to the decoded type.
Extension in BSONEncoding
Conformances
protocol BSONEncodable
A type that can be encoded to a BSON variant value.
Members
func encode(to: inout BSON.Field
) Encodes this integer as a value of type
BSON.uint64
.
Extension in NIOConcurrencyHelpers
Conformances
protocol AtomicPrimitive
The protocol that all types that can be made atomic must conform to.
protocol NIOAtomicPrimitive
The protocol that all types that can be made atomic must conform to.
Members
static let atomic_add: (OpaquePointer, UInt64) -> UInt64
static let atomic_compare_and_exchange: (OpaquePointer, UInt64, UInt64) -> Bool
static let atomic_create: (UInt64) -> OpaquePointer
static let atomic_destroy: (OpaquePointer) -> Void
static let atomic_exchange: (OpaquePointer, UInt64) -> UInt64
static let atomic_load: (OpaquePointer) -> UInt64
static let atomic_store: (OpaquePointer, UInt64) -> Void
static let atomic_sub: (OpaquePointer, UInt64) -> UInt64
static let nio_atomic_add: (UnsafeMutablePointer<catmc_nio_atomic_unsigned_long_long>, UInt64) -> UInt64
static let nio_atomic_compare_and_exchange: (UnsafeMutablePointer<catmc_nio_atomic_unsigned_long_long>, UInt64, UInt64) -> Bool
static let nio_atomic_create_with_existing_storage: (UnsafeMutablePointer<catmc_nio_atomic_unsigned_long_long>, UInt64) -> Void
static let nio_atomic_exchange: (UnsafeMutablePointer<catmc_nio_atomic_unsigned_long_long>, UInt64) -> UInt64
static let nio_atomic_load: (UnsafeMutablePointer<catmc_nio_atomic_unsigned_long_long>) -> UInt64
static let nio_atomic_store: (UnsafeMutablePointer<catmc_nio_atomic_unsigned_long_long>, UInt64) -> Void
static let nio_atomic_sub: (UnsafeMutablePointer<catmc_nio_atomic_unsigned_long_long>, UInt64) -> UInt64
typealias AtomicWrapper
Extension in SwiftSyntaxBuilder
Conformances
protocol ExpressibleByLiteralSyntax
A Swift type whose value can be represented directly in source code by a Swift literal.
Extension in JSONDecoding
Conformances
protocol JSONDecodable
A type that can be decoded from a JSON variant value.
Extension in JSONEncoding
Conformances
Extension in Vapor
Conformances
protocol AsyncRequestDecodable
Can convert
Request
to aSelf
.protocol AsyncResponseEncodable
Can convert
self
to aResponse
.protocol Content
Convertible to / from content in an HTTP message.
protocol RequestDecodable
Can convert
Request
to aSelf
.protocol ResponseEncodable
Can convert
self
to aResponse
.
Features
func encodeResponse(status: HTTPStatus, headers: HTTPHeaders, for: Request
) -> EventLoopFuture<Response> Asynchronously encodes
Self
into aResponse
, setting the supplied status and headers.