---
source: tests/backends_swift_snapshot_test.rs
expression: "&file.content"
---
// Generated by alef. Do not edit by hand.
// swift-format-ignore-file

import Foundation
import RustBridge
/// Source-text position (row, column).
public struct Point: Codable, Sendable, Hashable {
    public let row: UInt32
    public let column: UInt32
    public init(row: UInt32, column: UInt32) {
        self.row = row
        self.column = column
    }
}

// MARK: - Internal FFI conversions for Point
internal extension Point {
    init(_ rb: RustBridge.PointRef) throws {
        self.row = rb.row()
        self.column = rb.column()
    }

    func intoRust() throws -> RustBridge.Point {
        return RustBridge.Point(self.row, self.column)
    }
}

public typealias PointRef = RustBridge.PointRef

public typealias PointRefMut = RustBridge.PointRefMut

// MARK: - From-JSON Helpers
// Public helpers that decode JSON into first-class Swift types.
// First-class struct types (Codable) use JSONDecoder directly.
// Opaque RustBridge types forward to RustBridge.

public func pointFromJson(_ json: String) throws -> Point {
    let data = json.data(using: .utf8) ?? Data()
    return try JSONDecoder().decode(Point.self, from: data)
}
// swift-bridge opaque type used across Task.detached boundaries — Rust type is Send + Sync.
extension RustBridge.Point: @unchecked Sendable {}
