Initializervapor 4.114.1Vapor
init(stringLiteral:)
Initializes the ByteCount
via a descriptive string. Available suffixes are: kb
, mb
, gb
, tb
init(stringLiteral value: String)
Parameters
- value
The string value (
1mb
)
Initializes the ByteCount
via a descriptive string. Available suffixes are: kb
, mb
, gb
, tb
init(stringLiteral value: String)
The string value (1mb
)
import Vapor
Vapor 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.
struct ByteCount
let bytes: ByteCount = “2kb” print(bytes.value) // 2048
@frozen struct String
A Unicode string value that is a collection of characters.
init(integerLiteral value: Int)
Initializes the ByteCount
with the raw byte count
init(value: Int)
let value: Int
The value in Bytes