String

extension String: Error

Turn a string into an error, so that it can be thrown as an exception.

This should only be used in tests.

  • The string itself is the error description.

    Declaration

    Swift

    public var errorDescription: String? { get }
  • Create a string from a Rust-allocated char pointer and deallocate the char pointer.

    Declaration

    Swift

    public init(freeingGleanString rustString: UnsafeMutablePointer<CChar>)