---
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
/// A demo configuration struct.
public typealias Config = RustBridge.Config

/// Processing status.
public typealias Status = RustBridge.Status

/// Errors emitted by demo operations.
public enum DemoError: Swift.Error {
    /// Input validation failed.
    case invalidInput
    /// Processing encountered an error.
    case processingFailed
    /// Synthetic case raised when a Rust serde unit-enum raw value cannot
    /// be mapped to a known Swift case during DTO unmarshaling.
    case validation(message: String, source: String)
}

// MARK: - Free-function Forwarders
// Re-export every public free function on the source Rust crate as a
// top-level `public func` on the host module so consumers do not need to
// `import RustBridge` directly. Forwarders take Swift-native parameter
// types and convert to the swift-bridge runtime types internally.

/// Process input and return a result.
public func process(input: String, count: UInt32) throws -> String {
        let _rb_input = RustString(input)
    return try RustBridge.process(_rb_input, count).toString()
}
// swift-bridge opaque type used across Task.detached boundaries — Rust type is Send + Sync.
extension RustBridge.Config: @unchecked Sendable {}
