Initializerswift-ip 0.3.0Firewalls->IP
init(_:)
IP.ASN.swift:39init?(_ string: some StringProtocol)
init?(_ string: some StringProtocol)
import Firewalls
import IP
This Foundation-free module provides tools for parsing and formatting IP addresses, and data structures for performing efficient IP address lookups.
@frozen struct ASN
An Autonomous System Number (ASN).
@frozen enum IP
The namespace for IP types.
protocol StringProtocol : BidirectionalCollection, Comparable, ExpressibleByStringInterpolation, Hashable, LosslessStringConvertible, TextOutputStream, TextOutputStreamable where Self.Element == Character, Self.Index == String.Index, Self.StringInterpolation == DefaultStringInterpolation, Self.SubSequence : StringProtocol
A type that can represent a string as a collection of characters.
init(bson: BSON.AnyValue) throws
init(integerLiteral: UInt32)
init(value: UInt32)
static func get(_ storage: UInt32) -> IP.ASN
var description: String { get }
let value: UInt32
static func < (a: `Self`, b: `Self`) -> Bool
func encode(to field: inout BSON.FieldEncoder)
Encodes the ASN as a signed BSON Int32
, by mapping the range of the UInt32
value to the range of an Int32
.
consuming func set() -> UInt32