I am using swift-binary-parsing and tried to make a non-owning struct with some helper methods for a ParserSpan (a non-escapable, non-copyable type), but got two compiler errors.
import BinaryParsing
struct StringTable: ~Escapable, ~Copyable { // π An implicit initializer cannot return a ~Escapable result
let span: ParserSpan // π The '_read' accessor cannot return a ~Escapable result
}
Adding an explicit initializer also gave an error saying it canβt return a ~Escapable result.
How can these errors be resolved? I am familiar with how ownership and lifetimes work in Rust but not in Swift.