mirror of
https://github.com/apple/swift-nio
synced 2026-11-28 05:14:23 +00:00
Motivation: Sometimes getting read/getInteger to guess the type correctly can be annoying and it's handy to just say `as: UInt8.self` or similar. In other cases it's not as the type is clear from the environment. This now enables both, just like we already have for `write/set(integer:)` Modifications: added an `as: T.Type = T.self` argument which is optional as it has a default Result: easier to use `ByteBuffer` interfaces