Decimal128
public struct Decimal128 : BSONNumber, Equatable, Codable, CustomStringConvertible
A struct to represent the BSON Decimal128 type.
-
Declaration
Swift
public var bsonType: BSONType { get }
-
Declaration
Swift
public var description: String { get }
-
Initializes a
Decimal128
value from the providedString
. Returnsnil
if the input is not a valid Decimal128 string.Declaration
Swift
public init?(_ data: String)
-
Declaration
Swift
public init(from decoder: Decoder) throws
-
Declaration
Swift
public func encode(to: Encoder) throws
-
Declaration
Swift
public func encode(to storage: DocumentStorage, forKey key: String) throws
-
Declaration
Swift
public static func == (lhs: Decimal128, rhs: Decimal128) -> Bool
-
Declaration
Swift
public static func from(iterator iter: DocumentIterator) throws -> Decimal128
-
Create an
Int
from thisDecimal128
. Note: this function is not implemented yet and will always return nil.Declaration
Swift
public var intValue: Int? { get }
-
Create an
Int32
from thisDecimal128
. Note: this function is not implemented yet and will always return nil.Declaration
Swift
public var int32Value: Int32? { get }
-
Create an
Int64
from thisDecimal128
. Note: this function is not implemented yet and will always return nil.Declaration
Swift
public var int64Value: Int64? { get }
-
Create a
Double
from thisDecimal128
. Note: this function is not implemented yet and will always return nil.Declaration
Swift
public var doubleValue: Double? { get }
-
Returns this
Decimal128
. This is implemented as part ofBSONNumber
conformance.Declaration
Swift
public var decimal128Value: Decimal128? { get }