Int32
A 32-bit signed integer value type.
You’re reading documentation from an older version of Swift 6.1.
A symbol with the same signature as this one exists in the latest stable release of Swift 6.1.
@frozen struct Int32A 32-bit signed integer value type.
You’re reading documentation from an older version of Swift 6.1.
A symbol with the same signature as this one exists in the latest stable release of Swift 6.1.
@frozen struct Int32import Swiftprotocol AdditiveArithmetic : EquatableA type with values that support addition and subtraction.
protocol BinaryInteger : CustomStringConvertible, Hashable, Numeric, Strideable where Self.Magnitude : BinaryInteger, Self.Magnitude == Self.Magnitude.MagnitudeAn integer type with a binary representation.
protocol BitwiseCopyableprotocol CVarArgA type whose instances can be encoded, and appropriately passed, as elements of a C va_list.
protocol Comparable : EquatableA type that can be compared using the relational operators <, <=, >=, and >.
protocol CopyableA type whose values can be implicitly or explicitly copied.
protocol CustomReflectableA type that explicitly supplies its own mirror.
protocol CustomStringConvertibleA type with a customized textual representation.
protocol DecodableA type that can decode itself from an external representation.
protocol EncodableA type that can encode itself to an external representation.
protocol EquatableA type that can be compared for value equality.
protocol Escapableprotocol ExpressibleByIntegerLiteralA type that can be initialized with an integer literal.
protocol FixedWidthInteger : BinaryInteger, LosslessStringConvertible where Self.Magnitude : FixedWidthInteger, Self.Magnitude : UnsignedInteger, Self.Stride : FixedWidthInteger, Self.Stride : SignedIntegerAn integer type that uses a fixed size for every instance.
protocol Hashable : EquatableA type that can be hashed into a Hasher to produce an integer hash value.
protocol LosslessStringConvertible : CustomStringConvertibleA type that can be represented as a string in a lossless, unambiguous way.
protocol Numeric : AdditiveArithmetic, ExpressibleByIntegerLiteralA type with values that support multiplication.
protocol SIMDScalar : BitwiseCopyableA type that can be used as an element in a SIMD vector.
protocol Sendableprotocol SignedInteger : BinaryInteger, SignedNumericAn integer type that can represent both positive and negative values.
protocol SignedNumeric : NumericA numeric type with a negation operation.
protocol Strideable<Stride> : ComparableA type representing continuous, one-dimensional values that can be offset and measured.
init(_ source: Double) Creates an integer from the given floating-point value, rounding toward zero.
init(_ source: Float) Creates an integer from the given floating-point value, rounding toward zero.
init(_ source: Float16) Creates an integer from the given floating-point value, rounding toward zero.
init(bitPattern x: UInt32) Creates a new instance with the same memory representation as the given value.
init?(exactly source: Double) Creates an integer from the given floating-point value, if it can be represented exactly.
init?(exactly source: Float) Creates an integer from the given floating-point value, if it can be represented exactly.
init?(exactly source: Float16) Creates an integer from the given floating-point value, if it can be represented exactly.
init(from decoder: any Decoder) throws static var bitWidth: Int { get }The number of bits used for the underlying binary representation of values of this type.
var byteSwapped: Int32 { get }var customMirror: Mirror { get }A mirror that reflects the Int32 instance.
var leadingZeroBitCount: Int { get }The number of leading zeros in this value’s binary representation.
var magnitude: UInt32 { get }var nonzeroBitCount: Int { get }var trailingZeroBitCount: Int { get }The number of trailing zeros in this value’s binary representation.
var words: Int32.Words { get }static func != (lhs: Int32, rhs: Int32) -> Bool static func % (lhs: Int32, rhs: Int32) -> Int32 static func %= (lhs: inout Int32, rhs: Int32) static func & (lhs: Int32, rhs: Int32) -> Int32 static func &<< (lhs: Int32, rhs: Int32) -> Int32 static func &<<= (lhs: inout Int32, rhs: Int32) static func &= (lhs: inout Int32, rhs: Int32) static func &>> (lhs: Int32, rhs: Int32) -> Int32 static func &>>= (lhs: inout Int32, rhs: Int32) static func * (lhs: Int32, rhs: Int32) -> Int32 Multiplies two values and produces their product.
static func *= (lhs: inout Int32, rhs: Int32) Multiplies two values and stores the result in the left-hand-side variable.
static func + (lhs: Int32, rhs: Int32) -> Int32 Adds two values and produces their sum.
static func += (lhs: inout Int32, rhs: Int32) Adds two values and stores the result in the left-hand-side variable.
static func - (lhs: Int32, rhs: Int32) -> Int32 Subtracts one value from another and produces their difference.
static func -= (lhs: inout Int32, rhs: Int32) Subtracts the second value from the first and stores the difference in the left-hand-side variable.
static func / (lhs: Int32, rhs: Int32) -> Int32 static func /= (lhs: inout Int32, rhs: Int32) static func < (lhs: Int32, rhs: Int32) -> Bool static func <= (lhs: Int32, rhs: Int32) -> Bool static func == (lhs: Int32, rhs: Int32) -> Bool static func > (lhs: Int32, rhs: Int32) -> Bool static func >= (lhs: Int32, rhs: Int32) -> Bool static func ^ (lhs: Int32, rhs: Int32) -> Int32 static func ^= (lhs: inout Int32, rhs: Int32) static func | (lhs: Int32, rhs: Int32) -> Int32 static func |= (lhs: inout Int32, rhs: Int32) func addingReportingOverflow(_ other: Int32) -> (partialValue: Int32, overflow: Bool) func dividedReportingOverflow(by other: Int32) -> (partialValue: Int32, overflow: Bool) func dividingFullWidth(_ dividend: (high: Int32, low: Int32.Magnitude)) -> (quotient: Int32, remainder: Int32) Returns a tuple containing the quotient and remainder of dividing the given value by this value.
func encode(to encoder: any Encoder) throws Encodes this value into the given encoder.
func hash(into hasher: inout Hasher) Hashes the essential components of this value by feeding them into the given hasher.
func multipliedFullWidth(by other: Int32) -> (high: Int32, low: Int32.Magnitude) Returns a tuple containing the high and low parts of the result of multiplying this value by the given value.
func multipliedReportingOverflow(by other: Int32) -> (partialValue: Int32, overflow: Bool) func remainderReportingOverflow(dividingBy other: Int32) -> (partialValue: Int32, overflow: Bool) func signum() -> Int32 func subtractingReportingOverflow(_ other: Int32) -> (partialValue: Int32, overflow: Bool) @frozen struct SIMD16StorageStorage for a vector of 16 integers.
@frozen struct SIMD2StorageStorage for a vector of two integers.
@frozen struct SIMD32StorageStorage for a vector of 32 integers.
@frozen struct SIMD4StorageStorage for a vector of four integers.
@frozen struct SIMD64StorageStorage for a vector of 64 integers.
@frozen struct SIMD8StorageStorage for a vector of eight integers.
@frozen struct WordsA type that represents the words of this integer.
typealias IntegerLiteralType = Int32A type that represents an integer literal.
typealias Magnitude = UInt32A type that can represent the absolute value of any possible value of this type.
typealias SIMDMaskScalar = Int32var customPlaygroundQuickLook: _PlaygroundQuickLook { get }A custom playground Quick Look for the Int32 instance.
init() Creates a new value equal to zero.
init<T>(_ source: T) where T : BinaryInteger Creates a new instance from the given integer.
init?(_ description: String) Creates a new integer value from the given string.
init<T>(_ source: T) where T : BinaryFloatingPoint Creates an integer from the given floating-point value, rounding toward zero. Any fractional part of the value passed as source is removed.
init?<S>(_ text: S, radix: Int = 10) where S : StringProtocol Creates a new integer value from the given string and radix.
init(bigEndian value: Self) Creates an integer from its big-endian representation, changing the byte order if necessary.
init<Other>(clamping source: Other) where Other : BinaryInteger Creates a new instance with the representable value that’s closest to the given integer.
init?<T>(exactly source: T) where T : BinaryInteger Creates a new instance from the given integer, if it can be represented exactly.
init?<T>(exactly source: T) where T : BinaryFloatingPoint Creates an integer from the given floating-point value, if it can be represented exactly.
init(integerLiteral value: Self) init(littleEndian value: Self) Creates an integer from its little-endian representation, changing the byte order if necessary.
init<T>(truncatingIfNeeded source: T) where T : BinaryInteger Creates a new instance from the bit pattern of the given instance by truncating or sign-extending if needed to fit this type.
static var isSigned: Bool { get }A Boolean value indicating whether this type is a signed integer type.
static var max: Self { get }The maximum representable integer in this type.
static var min: Self { get }The minimum representable integer in this type.
static var zero: Self { get }The zero value.
static func random(in range: ClosedRange<Self>) -> Self Returns a random value within the specified range.
static func random(in range: Range<Self>) -> Self Returns a random value within the specified range.
static func random<T>(in range: ClosedRange<Self>, using generator: inout T) -> Self where T : RandomNumberGenerator Returns a random value within the specified range, using the given generator as a source for randomness.
static func random<T>(in range: Range<Self>, using generator: inout T) -> Self where T : RandomNumberGenerator Returns a random value within the specified range, using the given generator as a source for randomness.
var bigEndian: Self { get }The big-endian representation of this integer.
var bitWidth: Int { get }The number of bits in the binary representation of this value.
var description: String { get }A textual representation of this value.
var littleEndian: Self { get }The little-endian representation of this integer.
static func != (lhs: Self, rhs: Self) -> Bool Returns a Boolean value indicating whether two values are not equal.
static func != <Other>(lhs: Self, rhs: Other) -> Bool where Other : BinaryInteger Returns a Boolean value indicating whether the two given values are not equal.
static func != (lhs: Self, rhs: Self) -> Bool static func & (lhs: Self, rhs: Self) -> Self Returns the result of performing a bitwise AND operation on the two given values.
static func &* (lhs: Self, rhs: Self) -> Self static func &*= (lhs: inout Self, rhs: Self) Multiplies two values and stores the result in the left-hand-side variable, wrapping any overflow.
static func &+ (lhs: Self, rhs: Self) -> Self Returns the sum of the two given values, wrapping the result in case of any overflow.
static func &+= (lhs: inout Self, rhs: Self) Adds two values and stores the result in the left-hand-side variable, wrapping any overflow.
static func &- (lhs: Self, rhs: Self) -> Self Returns the difference of the two given values, wrapping the result in case of any overflow.
static func &-= (lhs: inout Self, rhs: Self) Subtracts the second value from the first and stores the difference in the left-hand-side variable, wrapping any overflow.
static func &<< <Other>(lhs: Self, rhs: Other) -> Self where Other : BinaryInteger 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 &<< (lhs: Self, rhs: Self) -> Self 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 &<<= <Other>(lhs: inout Self, rhs: Other) where Other : BinaryInteger 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 &>> <Other>(lhs: Self, rhs: Other) -> Self where Other : BinaryInteger 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 &>> (lhs: Self, rhs: Self) -> Self 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 &>>= <Other>(lhs: inout Self, rhs: Other) where Other : BinaryInteger 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 + (x: Self) -> Self Returns the given number unchanged.
static func += (lhs: inout Self, rhs: Self) static func - (operand: Self) -> Self Returns the additive inverse of the specified value.
static func -= (lhs: inout Self, rhs: Self) static func ... (minimum: Self) -> PartialRangeFrom<Self> Returns a partial range extending upward from a lower bound.
static func ... (maximum: Self) -> PartialRangeThrough<Self> Returns a partial range up to, and including, its upper bound.
static func ... (minimum: Self, maximum: Self) -> ClosedRange<Self> Returns a closed range that contains both of its bounds.
static func ..< (maximum: Self) -> PartialRangeUpTo<Self> Returns a partial range up to, but not including, its upper bound.
static func ..< (minimum: Self, maximum: Self) -> Range<Self> Returns a half-open range that contains its lower bound but not its upper bound.
static func < (x: Self, y: Self) -> Bool static func < <Other>(lhs: Self, rhs: Other) -> Bool where Other : BinaryInteger Returns a Boolean value indicating whether the value of the first argument is less than that of the second argument.
static func << <RHS>(lhs: Self, rhs: RHS) -> Self where RHS : BinaryInteger Returns the result of shifting a value’s binary representation the specified number of digits to the left.
static func << <Other>(lhs: Self, rhs: Other) -> Self where Other : BinaryInteger Returns the result of shifting a value’s binary representation the specified number of digits to the left.
static func <<= <Other>(lhs: inout Self, rhs: Other) where Other : BinaryInteger static func <= (lhs: Self, rhs: Self) -> 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 <= <Other>(lhs: Self, rhs: Other) -> Bool where Other : BinaryInteger 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 <= (lhs: Self, rhs: Self) -> Bool static func == (x: Self, y: Self) -> Bool static func == <Other>(lhs: Self, rhs: Other) -> Bool where Other : BinaryInteger Returns a Boolean value indicating whether the two given values are equal.
static func > (lhs: Self, rhs: Self) -> Bool Returns a Boolean value indicating whether the value of the first argument is greater than that of the second argument.
static func > <Other>(lhs: Self, rhs: Other) -> Bool where Other : BinaryInteger Returns a Boolean value indicating whether the value of the first argument is greater than that of the second argument.
static func > (lhs: Self, rhs: Self) -> Bool static func >= (lhs: Self, rhs: Self) -> 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 >= <Other>(lhs: Self, rhs: Other) -> Bool where Other : BinaryInteger 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 >= (lhs: Self, rhs: Self) -> Bool static func >> <RHS>(lhs: Self, rhs: RHS) -> Self where RHS : BinaryInteger Returns the result of shifting a value’s binary representation the specified number of digits to the right.
static func >> <Other>(lhs: Self, rhs: Other) -> Self where Other : BinaryInteger Returns the result of shifting a value’s binary representation the specified number of digits to the right.
static func >>= <Other>(lhs: inout Self, rhs: Other) where Other : BinaryInteger static func ^ (lhs: Self, rhs: Self) -> Self Returns the result of performing a bitwise XOR operation on the two given values.
static func | (lhs: Self, rhs: Self) -> Self Returns the result of performing a bitwise OR operation on the two given values.
static func ~ (x: Self) -> Self Returns the inverse of the bits set in the argument.
func advanced(by n: Int) -> Self Returns a value that is offset the specified distance from this value.
func distance(to other: Self) -> Int Returns the distance from this value to the given value, expressed as a stride.
func isMultiple(of other: Self) -> Bool mutating func negate() Replaces this value with its additive inverse.
func quotientAndRemainder(dividingBy rhs: Self) -> (quotient: Self, remainder: Self) Returns the quotient and remainder of this value divided by the given value.
import Synchronizationprotocol AtomicRepresentableA type that supports atomic operations through a separate atomic storage representation.
static func decodeAtomicRepresentation(_ representation: consuming Int32.AtomicRepresentation) -> Int32 static func encodeAtomicRepresentation(_ value: borrowing Int32) -> Int32.AtomicRepresentation typealias AtomicRepresentationimport Foundationinit(_ value: CGFloat) init?(exactly number: NSNumber) init(truncating number: NSNumber) init(_ number: NSNumber) init(_ value: String, format: IntegerFormatStyle<Self>.Percent, lenient: Bool = true) throws init(_ value: String, format: IntegerFormatStyle<Self>.Currency, lenient: Bool = true) throws init(_ value: String, format: IntegerFormatStyle<Self>, lenient: Bool = true) throws init<S>(_ value: S.ParseInput, strategy: S) throws where S : ParseStrategy, S.ParseOutput : BinaryInteger Initialize an instance by parsing value with the given strategy.
init<S>(_ value: S.ParseInput, strategy: S) throws where Self == S.ParseOutput, S : ParseStrategy func formatted() -> String Format self using IntegerFormatStyle()
func formatted<S>(_ format: S) -> S.FormatOutput where S : FormatStyle, S.FormatInput : BinaryInteger Format self with the given format. self is first converted to S.FormatInput type, then format with the given format.
func formatted<S>(_ format: S) -> S.FormatOutput where Self == S.FormatInput, S : FormatStyle Format self with the given format.
import MultipartKitParser, serializer, and Codable support for multipart/form-data.
protocol MultipartPartConvertibleA protocol to provide custom behaviors for parsing and serializing types from and to multipart data.
import VaporVapor is a framework for building server applications, APIs and websites in Swift. It provides a safe, performant and scalable foundation for building large complex backends.
protocol AsyncRequestDecodableCan convert Request to a Self.
protocol AsyncResponseEncodableCan convert self to a Response.
protocol Content : Decodable, Encodable, Sendable, AsyncRequestDecodable, AsyncResponseEncodable, RequestDecodable, ResponseEncodableConvertible to / from content in an HTTP message.
protocol RequestDecodableCan convert Request to a Self.
protocol ResponseEncodableCan convert self to a Response.
static var defaultContentType: HTTPMediaType { get }static func decodeRequest(_ request: Request) -> EventLoopFuture<Self> static func decodeRequest(_ request: Request) async throws -> Self mutating func afterDecode() throws mutating func beforeEncode() throws func encodeResponse(for request: Request) -> EventLoopFuture<Response> func encodeResponse(status: HTTPStatus, headers: HTTPHeaders = [:], for request: Request) -> EventLoopFuture<Response> Asynchronously encodes Self into a Response, setting the supplied status and headers.
import Yamsprotocol NodeRepresentableType is representable as Node.
protocol ScalarConstructibleTypes conforming to this protocol can be extracted Node.Scalars.
protocol ScalarRepresentable : NodeRepresentableType is representable as Node.scalar.
protocol YAMLEncodable : EncodableTypes conforming to this protocol can be encoded by YamlEncoder.
func box() -> Node Returns this value wrapped in a Node.scalar.
func represented() throws -> Node This value’s Node.scalar representation.